Colour functions

Comparing different ways to generate colours with CSS (and different PHP random functions)

  1. 527 coloured rectangles, HSL values

    527 coloured rectangles. The three HSL values are generated with the PHP mt_rand() function

  2. 527 coloured rectangles, RGB values

    527 coloured rectangles. The three RGB values are generated with the PHP mt_rand() function

  3. 527 coloured rectangles, Hexadecimal

    527 coloured rectangles. The six hexadecimal digits are generated with the PHP mt_rand() function

  4. Comparing HSL and RGB

    A side by side comparison of random generated HSL values and random generated RGB values

  5. Comparing RGB and Hexadecimal

    A side by side comparison of random generated RGB values and random generated hexadecimal values

  6. Random colours from the Extended color keywords list

    Looking at the overall image of 527 random colours generated from the Extended color keywords list

  7. Comparing HSL and Colour names

    A side by side comparison of random generated HSL values and random colours from the Extended color keywords list

  8. Comparing RGB and Colour names

    A side by side comparison of random generated RGB values and random colours from the Extended color keywords list

  9. Comparing hsl(), rgb() and colour names

    A side by side comparison of random generated HSL values, RGB values, and random colours from the Extended color keywords list

  10. 527 coloured rectangles, CMYK values

    527 coloured rectangles. Random CMYK values are translated to RGB using an image.

  11. Comparing hsl() and cmyk

    A side by side comparison of random generated HSL values, and random cmyk values

  12. Comparing rgb() and cmyk

    A side by side comparison of random generated RGB values, and random cmyk values

  13. Comparing hsl(), rgb() and cmyk

    A side by side comparison of random generated HSL values, RGB values, and random cmyk values

  14. 527 coloured rectangles, HUSL values

    527 coloured rectangles. Random HUSL values are translated to hexadecimal values.

  15. Comparing HUSL, and HSL

    Comparing HUSL and HSL

  16. 527 coloured rectangles, randomly chosen from an array of colour names

    The colour of each rectangle is chosen at random from an array of colour names. This shoulc result in a more even distribution of colours.

  17. Comparing random array of colour names, and HSL

    Comparing a random array of colour names and HSL

  18. Comparing random array of colour names, and RGB

    Comparing a random array of colour names and RGB

  19. 527 coloured rectangles, HUSL values

    The colour of each rectangle is generated at random by using the HUSL library.

  20. Comparing HSL to HUSL

    Comparing HSL to HUSL.