Color in table

Each line in a table can be colorized by one color:

Data

data =  {
    user: [
        {
            firstname: "Jean",
            lastname: "Dujardin",
            color: {
                r: 255,
                g: 0;
                b: 0
            }
        },
        {
            firstname: "Omar",
            lastname: "Sy",
            color: {
                r: 0,
                g: 255,
                b: 0
            }
        }
    ]
}
  • first line: get #0000FF color

  • second line: get #00FFFF color

  • each line: get the color corresponding to the color key in each user object

The first line get the #0000FF color and the second line get the #00FFFF color. Each line get the color corresponding to the color key in each user object.

Last updated