Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Extending color to be more robust #938

Open
kevinSuttle opened this issue Dec 22, 2015 · 26 comments
Open

Proposal: Extending color to be more robust #938

kevinSuttle opened this issue Dec 22, 2015 · 26 comments
Labels
no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). schema.org vocab General top level tag for issues on the vocabulary

Comments

@kevinSuttle
Copy link

https://www.wikidata.org/wiki/Q1075
https://schema.org/color

Example with data taken from: http://www.colorhexa.com/6495ed

{
  "@context": "http://schema.org",
  "@type": "Color",
  "hasCSScolorName": {
    "value": "true",
    "name": "cornflower_blue"
  },
  "@values": {
    "hexTriplet": "#6495ed",
    "hexQuadruplet": "#6495edff",
    "rgbDecimal": "rgb(100,149,237)",
    "rgbPercent": "rgb(39.2%,58.4%,92.9%)",
    "CMYK": "58, 37, 0, 7",
    "HSL": "hsl(218.5,79.2%,66.1%)",
    "HSB": "218.5°, 57.8, 92.9",
    "webSafe": "#6699ff",
    "CIE-LAB": "61.927, 9.337, -49.305",
    "XYZ": "31.286, 30.317, 84.319",
    "xyY": "0.214, 0.208, 30.317",
    "CIE-LCH": "61.927, 50.182, 280.723",
    "CIE-LUV": "61.927, -22.943, -79.794",
    "Hunter-Lab": "55.061, 5.068, -52.253",
    "Binary": "01100100, 10010101, 11101101"
  },
  "shades": {
    "@type": "ItemList",
    "numberOfItems": "12",
    "itemListOrder": "http://schema.org/ItemListOrderAscending",
    "itemListElement": [
      "#000103",
      "#020915",
      "#041126",
      "#061838",
      "#092049",
      "#0b275b",
      "#0d2f6d",
      "#0f377e",
      "#113e90",
      "#1346a1",
      "#154db3",
      "#1755c4",
      "#195dd6",
      "#f1f5fd"
    ]
  },
  "tints": {
    "@type": "ItemList",
    "numberOfItems": "12",
    "itemListOrder": "http://schema.org/ItemListOrderAscending",
    "itemListElement": [
      "#2f71e7",
      "#417de9",
      "#5289eb",
      "#6495ed",
      "#76a1ef",
      "#87adf1",
      "#99b9f3",
      "#aac5f5",
      "#bcd1f7",
      "#cdddf9",
      "#dfe9fb",
      "#f1f5fd"
    ]
  },
  "schemes": {
    "complimentary": "#edbc64",
    "splitComplimentary": "#ed7864, #d9ed64",
    "analogous": "#64d9ed, #7864ed",
    "triadic": "#95ed64, #ed6495"
  },
  "colorBlindnessPerceptions": {
    "Monochromacy": {
      "Achromatopsia": "#909090",
      "atypicalAchromatopsia": "#8791a3"
    },
    "Dichromacy": {
      "Protanopia": "#7898ec",
      "Deuteranopia": "#669bed",
      "Tritanopia": "#4ba7b3"
    },
    "Trichromacy": {
      "Protanomaly": "#7197ec",
      "Deuteranomaly": "#6599ed",
      "Tritanomaly": "#54a0c8"
    }
  }
}

A Color is just a set of name/value pairs. All mathematically defined.

Discussion points

  1. Alpha values?
  2. Programming language-specific formats (i.e. SwiftUIColorRGB)
  3. Various CMYK formats
  4. HSB vs HSV?
  5. All the colors?
@danbri
Copy link
Contributor

danbri commented Dec 22, 2015

Thanks for raising the issue. It's a complex topic but I do think we can do better than "Text" :) Improvements could also be interesting for internet-of-things scenarios like light bulbs, maybe...

@danbri danbri added type:enhancement schema.org vocab General top level tag for issues on the vocabulary labels Dec 22, 2015
@kevinSuttle
Copy link
Author

Indeed!

@mfhepp
Copy link
Contributor

mfhepp commented Dec 22, 2015

why not simply add PropertyValue to the range of color?


martin hepp
www: http://www.heppnetz.de/
email: [email protected]

Am 22.12.2015 um 21:27 schrieb Kevin Suttle [email protected]:

https://www.wikidata.org/wiki/Q1075
https://schema.org/color

Example with data taken from: http://www.colorhexa.com/6495ed

{
"@context": "http://schema.org",
"@type": "color",
"hasCSScolorName": {
"value": "true",
"name": "cornflower_blue"
},
"@values": {
"hexTriplet": "#6495ed",
"hexQuadruplet": "#6495edff",
"rgbDecimal": "rgb(100,149,237)",
"rgbPercent": "rgb(39.2%,58.4%,92.9%)",
"CMYK": "58, 37, 0, 7",
"HSL" : "hsl(218.5,79.2%,66.1%)",
"HSB": "218.5°, 57.8, 92.9",
"webSafe": "#6699ff",
"CIE-LAB": "61.927, 9.337, -49.305",
"XYZ": "31.286, 30.317, 84.319",
"xyY": "0.214, 0.208, 30.317",
"CIE-LCH": "61.927, 50.182, 280.723",
"CIE-LUV": "61.927, -22.943, -79.794",
"Hunter-Lab": "55.061, 5.068, -52.253",
"Binary": "01100100, 10010101, 11101101"
},
"shades": {
"@type": "ItemList",
"numberOfItems": "12",
"itemListOrder": "http://schema.org/ItemListOrderAscending",
"itemListElement": [
"#103",
"#020915",
"#041126",
"#061838",
"#092049",
"#0b275b",
"#0d2f6d",
"#0f377e",
"#113e90",
"#1346a1",
"#154db3",
"#1755c4",
"#195dd6",
"#f1f5fd"
]
},
"tints": {
"@type": "ItemList",
"numberOfItems": "12",
"itemListOrder": "http://schema.org/ItemListOrderAscending",
"itemListElement": [
"#2f71e7",
"#417de9",
"#5289eb",
"#6495ed",
"#76a1ef",
"#87adf1",
"#99b9f3",
"#aac5f5",
"#bcd1f7",
"#cdddf9",
"#dfe9fb",
"#f1f5fd"
]
},
"schemes": {
"complimentary": "#edbc64",
"splitComplimentary": "#ed7864, #d9ed64",
"analogous": "#64d9ed, #7864ed",
"triadic": "#95ed64, #ed6495"
},
"colorBlindnessPerceptions": {
"Monochromacy": {
"Achromatopsia": "#909090",
"atypicalAchromatopsia": "#8791a3"
},
"Dichromacy": {
"Protanopia": "#7898ec",
"Deuteranopia": "#669bed",
"Tritanopia": "#4ba7b3"
},
"Trichromacy": {
"Protanomaly": "#7197ec",
"Deuteranomaly": "#6599ed",
"Tritanomaly": "#54a0c8"
}
}
}
A Color is just a set of name/value pairs. All mathematically defined.


Reply to this email directly or view it on GitHub.

@Dataliberate
Copy link
Contributor

1

Richard Wallis
Founder, Data Liberate
http://dataliberate.com
Linkedin: http://www.linkedin.com/in/richardwallis
Twitter: @rjw

On 22 December 2015 at 21:43, Martin Hepp [email protected] wrote:

why not simply add PropertyValue to the range of color?


martin hepp
www: http://www.heppnetz.de/
email: [email protected]

Am 22.12.2015 um 21:27 schrieb Kevin Suttle [email protected]:

https://www.wikidata.org/wiki/Q1075
https://schema.org/color

Example with data taken from: http://www.colorhexa.com/6495ed

{
"@context": "http://schema.org",
"@type": "color",
"hasCSScolorName": {
"value": "true",
"name": "cornflower_blue"
},
"@values": {
"hexTriplet": "#6495ed",
"hexQuadruplet": "#6495edff",
"rgbDecimal": "rgb(100,149,237)",
"rgbPercent": "rgb(39.2%,58.4%,92.9%)",
"CMYK": "58, 37, 0, 7",
"HSL" : "hsl(218.5,79.2%,66.1%)",
"HSB": "218.5°, 57.8, 92.9",
"webSafe": "#6699ff",
"CIE-LAB": "61.927, 9.337, -49.305",
"XYZ": "31.286, 30.317, 84.319",
"xyY": "0.214, 0.208, 30.317",
"CIE-LCH": "61.927, 50.182, 280.723",
"CIE-LUV": "61.927, -22.943, -79.794",
"Hunter-Lab": "55.061, 5.068, -52.253",
"Binary": "01100100, 10010101, 11101101"
},
"shades": {
"@type": "ItemList",
"numberOfItems": "12",
"itemListOrder": "http://schema.org/ItemListOrderAscending",
"itemListElement": [
"#103",
"#020915",
"#041126",
"#061838",
"#092049",
"#0b275b",
"#0d2f6d",
"#0f377e",
"#113e90",
"#1346a1",
"#154db3",
"#1755c4",
"#195dd6",
"#f1f5fd"
]
},
"tints": {
"@type": "ItemList",
"numberOfItems": "12",
"itemListOrder": "http://schema.org/ItemListOrderAscending",
"itemListElement": [
"#2f71e7",
"#417de9",
"#5289eb",
"#6495ed",
"#76a1ef",
"#87adf1",
"#99b9f3",
"#aac5f5",
"#bcd1f7",
"#cdddf9",
"#dfe9fb",
"#f1f5fd"
]
},
"schemes": {
"complimentary": "#edbc64",
"splitComplimentary": "#ed7864, #d9ed64",
"analogous": "#64d9ed, #7864ed",
"triadic": "#95ed64, #ed6495"
},
"colorBlindnessPerceptions": {
"Monochromacy": {
"Achromatopsia": "#909090",
"atypicalAchromatopsia": "#8791a3"
},
"Dichromacy": {
"Protanopia": "#7898ec",
"Deuteranopia": "#669bed",
"Tritanopia": "#4ba7b3"
},
"Trichromacy": {
"Protanomaly": "#7197ec",
"Deuteranomaly": "#6599ed",
"Tritanomaly": "#54a0c8"
}
}
}
A Color is just a set of name/value pairs. All mathematically defined.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#938 (comment)
.

@kevinSuttle
Copy link
Author

@mfhepp You mean instead of the 2nd-level "@values" object? Flattening it out?

@kevinSuttle
Copy link
Author

The other huge issue facing color is that there is no one unique ID to reference all colors globally. Each brand will have their own definitions or vocabulary, but those are specific to an individual org.

Even combined, there aren't enough:

  • CSS Color names
  • X11 Color names
  • Pantone Color names

There are literally millions and millions of colors—more if you start going into alpha channels.

@kevinSuttle
Copy link
Author

One thought is to allow brands to specify the names of the colors used in their org palettes, referenced by a master company palette.

This means that there would be no global ID for a given color other than the hexTriplet value.

Let's use the ACME company, and its Rocketskates brand as an example.

Brand schema

{
  "@context": "https://schemas.acme.com",
  "@type": "brand",
  "name": "ACME",
  "fullName": "ACME, Inc.",
  "isPartOf": "https://schemas.acme.com/design/brands",
  "version": "0.1.0",
  "colorPalette": "https://schemas.acme.com/design/brands/rocketskates/colors",
  "logos": "https://schemas.acme.com/design/brands/rocketskates/logos"
}

Color schema

"parentPalette": "https://schemas.acme.com/design/brands/rocketskates/colors",

ColorPalette schema

{
  "@context": "https://schemas.acme.com",
  "@type": "ColorPalette",
  "brand": "ACME",
  "version": "0.1.0",
  "rootPalette": "https://schemas.acme.com/design/colors",
  // notice the differing, higher-level URL
  "values": {
   ["#162738", "#FC353F", "#7ACC10", "#4682E0", "#E8E8E8"]
}

@dahukanna
Copy link

The root-palette schema defines the colour, not how it is used, so needs to be specific enough to do that job.
Beyond using the unique hextriplet code, any other id would have to be unique and not require any supporting context. As long as derived name is supplied and managed by the brand, that allows for a sliding scale in terms of scope i.e. is the brand global to the company or specific to just one product.

@kevinSuttle
Copy link
Author

Yes, agreed.

@kevinSuttle
Copy link
Author

What is the process of moving this forward?

@kevinSuttle
Copy link
Author

Another great example, but showing relational data.
https://toolbelt.pixelapse.com/color/IBM

@Dataliberate
Copy link
Contributor

Yes an excellent example to try marking up with what you are proposing.

As for moving this forward, the best thing to do would be to create:

  • a proposal for a new Type - Color defining what it’s super type(s)
    would be.
  • a proposal for what new or existent properties could have Color in
    their range and what type they would expect.
  • a few examples, preferably including some based upon real situations
    such as you reference. These examples should include examples for
    Microdata, RDFa, and JSON-LD markup.

As you demonstrate, beyond the basic name, sameAs, url, description,
alternateName properties there are lots of potential properties. Some
maybe common enough to add to a Color type such as hexCode. Others could
make use of additionalProperty as suggested by Martin.

If we then get enlist agreement those definitions and examples could then
become subject of a Pull request to move forward to becoming part of a
future release.

@kevinSuttle
Copy link
Author

Thanks @RichardWallis!

@Dataliberate
Copy link
Contributor

If you want to work on, and potentially share before proposing, your own
local copy of Schema.org to work with, you might find this and the
following posts useful:

@kevinSuttle
Copy link
Author

Whoa. Awesome! Thank you!

@wiesmann
Copy link

Would it make sense to sync/adopt/clone the gs1 colorCode definition:

http://gs1.org/voc/ColourCodeDetails

@Dataliberate
Copy link
Contributor

That would work if we want to delegate the definition of the attributes of
the colour to an external authoritative source.

One property identifying an authoritative list of colours colorCodeList -
in Schema.org that would probably expect a URL type so that you could link
to http://gs1.org/voc/ColourCodeList-PANTONE_HEXACHROME, “My Color List”, “
https://en.wikipedia.org/wiki/Natural_Color_System”, etc. A second [Text]
property colorCode identifying the colour within that list.

If we wanted to optionally describe the attributes of the colour we could
add further properties such as hexCode, and also make use of
additionalProperty for the more obscure ones.

If this makes sense, the creation of a (ColorDetail ?) type which could be
added to the range of the color property.

@kevinSuttle
Copy link
Author

Just noticed that @duckduckgo has this in their search results already. (see ref. above, as well)
https://duck.co/ia/view/color_codes

@kevinSuttle
Copy link
Author

kevinSuttle commented Apr 25, 2016

cc: @Qix- @jonathantneal @MoOx

@Crissov
Copy link

Crissov commented Aug 9, 2016

I, too, wished for a better schema to describe colors at Wikidata, but the converters linked to above make it look like there were simple 1:1 relations between different color spaces and systems despite varying gamuts, granularity and more fundamental differences (e.g. additive vs. subtractive).

@LeaVerou
Copy link

If there is a Color type, there should also be a ColorSpace type with a colorProfile attribute to link to an ICC profile.

@kevinSuttle
Copy link
Author

Agreed!

@kevinSuttle
Copy link
Author

@kevinSuttle
Copy link
Author

I just saw that <meta name="theme-color" content="#3c790a"> is coming in HTML 5.2.

Not exactly namespacing, and there's nothing stopping us from doing this now.

@kevinSuttle
Copy link
Author

Here's a case where this would be incredibly useful.

whatwg/html#803 (comment)

@github-actions
Copy link

github-actions bot commented Sep 2, 2020

This issue is being tagged as Stale due to inactivity.

@github-actions github-actions bot added the no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). label Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-issue-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). schema.org vocab General top level tag for issues on the vocabulary
Projects
None yet
Development

No branches or pull requests

8 participants