Jump to content

Template talk:Colort/Color

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

RGB percentages a bad idea, probably even worse than HSL/HSV

[edit]

The RGB percentages do not add anything to the hex code. These, being computed directly by (sRGB/255), are also wrong because you don't do math in a space that is not linear.

The HSL/HSV bits are well, also bad for the same reason, but at least these can be justified on the basis of "this is how they used to choose colors". RGB percentages are not as commonly used for this purpose. Artoria2e5 🌉 10:25, 4 April 2023 (UTC)[reply]

This template was originally written in 2006 and has hardly been edited since 2013. At the time, CSS and the Web didn’t care much about anything but sRGB in its various representation formats.
If you look at some tables that use this template, you’ll notice several named colors were obviously created by choosing round R, G, B percentage values. (They might not have used sRGB, but weren’t adapted later either.) Hex codes don’t bring much new to the table, indeed, except for the occasional leet-speak #c0ffee.
Like CSS, nowadays, I’d probably prefer different or additional representations in those tables. They should be calculated by a Lua module. At first sight, Module:Color looks like it can do everything this template does now, but not everything that one might want.
If you think you can improve it without breaking articles, go ahead. — Christoph Päper 13:54, 4 April 2023 (UTC)[reply]