@financial-times/o-colors
Advanced tools
Comparing version 6.2.0 to 6.2.1
# Changelog | ||
### [6.2.1](https://www.github.com/Financial-Times/origami/compare/o-colors-v6.2.0...o-colors-v6.2.1) (2021-11-02) | ||
### Bug Fixes | ||
* import o-colors mixer demo markup ([a90427b](https://www.github.com/Financial-Times/origami/commit/a90427b3c709964b0043b1b0e10a22fd79b659a6)) | ||
* remove console.log from o-colors demo ([e4ae412](https://www.github.com/Financial-Times/origami/commit/e4ae4124e438564d8f24f9d76a3116827c4fb839)) | ||
* Update `o-brand` in components, replace "master" with "core" ([322617e](https://www.github.com/Financial-Times/origami/commit/322617ea80f30a6825d9c36872e05574b871ea82)) | ||
## [6.2.0](https://www.github.com/Financial-Times/origami/compare/o-colors-v6.1.1...o-colors-v6.2.0) (2021-09-24) | ||
@@ -8,3 +17,3 @@ | ||
* add wheat-100 to o-colors master brand palette ([ffb5781](https://www.github.com/Financial-Times/origami/commit/ffb57819342a4c9ec9daec4004a09689d5227454)) | ||
* add wheat-100 to o-colors core brand palette ([ffb5781](https://www.github.com/Financial-Times/origami/commit/ffb57819342a4c9ec9daec4004a09689d5227454)) | ||
@@ -11,0 +20,0 @@ ### [6.1.1](https://www.github.com/Financial-Times/origami/compare/o-colors-v6.1.0...o-colors-v6.1.1) (2021-09-21) |
@@ -5,7 +5,7 @@ import { getContrastRatio } from '../shared/contrast-ratio.js'; | ||
document.addEventListener('DOMContentLoaded', function() { | ||
const forms = document.forms; | ||
const mixer = forms[0]['mixer']; | ||
const base = forms[0]['base']; | ||
const form = document.getElementById('color-mix-form'); | ||
const mixer = form['mixer']; | ||
const base = form['base']; | ||
forms[0].addEventListener('change', () => { | ||
form.addEventListener('change', () => { | ||
mixColors(mixer.value, base.value); | ||
@@ -21,3 +21,3 @@ | ||
//set visible hex value and sass function to default values of mixColors | ||
forms[1]['range'][5].checked = true; | ||
form['range'][5].checked = true; | ||
const defaultHex = getComputedStyle(document.documentElement).getPropertyValue(`--o-colors-${mixer.value}-50`); | ||
@@ -51,3 +51,3 @@ fillCodeSnippets(defaultHex, mixer.value, base.value, 50); | ||
const fillSwatches = (hexes, mixer, base) => { | ||
const range = document.forms[1]['range']; | ||
const range = document.forms[0]['range']; | ||
hexes.forEach((hex, index) => { | ||
@@ -54,0 +54,0 @@ const swatch = range[index]; |
{ | ||
"name": "@financial-times/o-colors", | ||
"type": "module", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "The default colour palette for all FT products. The palette supports colour contrast checking, colour mixing and toneing.", | ||
@@ -34,3 +34,5 @@ "keywords": [ | ||
"start": "npx serve ./demos/local", | ||
"build": "npm_config_yes=true npx \"origami-build-tools@11\" install && npm_config_yes=true npx \"origami-build-tools@11\" demo" | ||
"build": "bash ../../scripts/component/build.bash", | ||
"test": "bash ../../scripts/component/test.bash", | ||
"lint": "bash ../../scripts/component/lint.bash" | ||
}, | ||
@@ -37,0 +39,0 @@ "volta": { |
102
README.md
@@ -30,3 +30,3 @@ # o-colors [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](#licence) | ||
<!-- default background colour set --> | ||
<!-- e.g. for the master brand `background: #fff1e5;` --> | ||
<!-- e.g. for the core brand `background: #fff1e5;` --> | ||
</body> | ||
@@ -87,25 +87,25 @@ ``` | ||
---|--- | ||
black | master, internal, whitelabel | ||
white | master, internal, whitelabel | ||
oxford | master, internal | ||
teal | master, internal | ||
slate | master, internal, | ||
lemon | master, internal, | ||
jade | master, internal | ||
mandarin | master, internal | ||
crimson | master, internal | ||
paper | master | ||
claret | master | ||
wheat | master | ||
sky | master | ||
velvet | master | ||
candy | master | ||
wasabi | master | ||
light-blue | master | ||
graphics-dark-blue | master | ||
ft-pink (previously brand-ft-pink) | master | ||
ft-grey | master | ||
org-b2c | master | ||
org-b2c-dark | master | ||
org-b2c-light | master | ||
black | core, internal, whitelabel | ||
white | core, internal, whitelabel | ||
oxford | core, internal | ||
teal | core, internal | ||
slate | core, internal, | ||
lemon | core, internal, | ||
jade | core, internal | ||
mandarin | core, internal | ||
crimson | core, internal | ||
paper | core | ||
claret | core | ||
wheat | core | ||
sky | core | ||
velvet | core | ||
candy | core | ||
wasabi | core | ||
light-blue | core | ||
graphics-dark-blue | core | ||
ft-pink (previously brand-ft-pink) | core | ||
ft-grey | core | ||
org-b2c | core | ||
org-b2c-dark | core | ||
org-b2c-light | core | ||
@@ -173,3 +173,3 @@ There are additional colours in the palette by default including tones and mixes. [See the registry demos](https://registry.origami.ft.com/components/o-colors) for a full list. | ||
See [o-colors SassDoc](https://registry.origami.ft.com/components/o-colors/sassdoc?brand=master#o-colors-mixin-ocolorssetusecase) for more details and examples. | ||
See [o-colors SassDoc](https://registry.origami.ft.com/components/o-colors/sassdoc?brand=core#o-colors-mixin-ocolorssetusecase) for more details and examples. | ||
@@ -182,29 +182,29 @@ ### Usecases | ||
---|---|--- | ||
page | background | master, internal, whitelabel | ||
focus | outline | master, internal | ||
box | background | master, internal | ||
link | text | master, internal | ||
link-hover | text | master, internal | ||
link-title | text | master, internal | ||
link-title-hover | text | master, internal | ||
title | text | master, internal | ||
body | text | master, internal | ||
muted | text | master, internal | ||
tag-link | text | master | ||
tag-link-hover | text | master | ||
opinion-tag-link | text | master | ||
opinion-tag-link-hover |text | master | ||
opinion | background | master | ||
hero | background | master | ||
hero-opinion | background | master | ||
hero-highlight | background | master | ||
page | background | core, internal, whitelabel | ||
focus | outline | core, internal | ||
box | background | core, internal | ||
link | text | core, internal | ||
link-hover | text | core, internal | ||
link-title | text | core, internal | ||
link-title-hover | text | core, internal | ||
title | text | core, internal | ||
body | text | core, internal | ||
muted | text | core, internal | ||
tag-link | text | core | ||
tag-link-hover | text | core | ||
opinion-tag-link | text | core | ||
opinion-tag-link-hover |text | core | ||
opinion | background | core | ||
hero | background | core | ||
hero-opinion | background | core | ||
hero-highlight | background | core | ||
**Section colors** | | ||
section-life-arts | all | master | ||
section-life-arts-alt | all | master | ||
section-magazine | all | master | ||
section-magazine-alt | all | master | ||
section-house-home | all | master | ||
section-house-home-alt |all | master | ||
section-money | all | master | ||
section-money-alt | all | master | ||
section-life-arts | all | core | ||
section-life-arts-alt | all | core | ||
section-magazine | all | core | ||
section-magazine-alt | all | core | ||
section-house-home | all | core | ||
section-house-home-alt |all | core | ||
section-money | all | core | ||
section-money-alt | all | core | ||
@@ -211,0 +211,0 @@ #### Default Usecases |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116336