Page MenuHomePhabricator

Add a « color » datatype to Wikidata
Open, Needs TriagePublicFeature

Description

Feature summary

Wikidata has datatypes for numbers, dates, and a number of other things. However it does not have a datatype and proper support for stuffs that are popping all over the place, like, here, colors.

Use case(s) :
The Wikidata property P465 https://www.wikidata.org/wiki/Property:P465 has 10430 use at the time of writing. It’s a property that stores a HTML coded color as an hexadecimal triple. It’s a popular and widely used color format, although of course not universal.

Benefits :
It would allow the color to be shown in the Wikidata user interface without ugly hacks, allow a proper support of colors in the query service visualization for example.

See also :
The discussion that triggered the creation of the ticket : https://www.wikidata.org/w/index.php?title=Wikidata:Request_a_query&oldid=1668084082#Make_a_query_more_visual .

Related Objects

Event Timeline

Comment by Infrastruktur ( https://www.wikidata.org/wiki/User:Infrastruktur ): https://www.wikidata.org/w/index.php?title=Wikidata:Request_a_query&diff=1668084082&oldid=1668050412&diffmode=source

Thumbs up. 24 bits was AFAIK for some time considered sufficient to represent all colors discernible by humans, but this model is too simplistic. The human eye is more sensitive to changes in luminance than to changes in chrominance something that video compression schemes know to take advantage of. It's a good idea to have a datatype for color, but chances are the best way to natively store this isn't RGB. Maybe a floating point version of YUV or YCbCr is closer to optimal? It certainly gives a more accurate representation using the same amount of bits per component. I don't have a developer account so if someone can copy and paste this into Phabricator that would be great, thanks.

Maybe this color type could have a "color system format" like how quantity accepts units? This way someone can put in an RGB value and mark it as an RGB color so nobody gets confused.