From 4097d084daa3f3ac9736956581f320777971fe2b Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Mon, 24 Apr 2023 13:59:50 +0200 Subject: [PATCH] working on light colorblind mode --- scripts/themes.config.ts | 4 +- .../light.protanopia-deuteranopia.json5 | 75 +++++++++++++++++++ 2 files changed, 77 insertions(+), 2 deletions(-) diff --git a/scripts/themes.config.ts b/scripts/themes.config.ts index b940943d3..20c512743 100644 --- a/scripts/themes.config.ts +++ b/scripts/themes.config.ts @@ -27,13 +27,13 @@ export const themes: TokenBuildInput[] = [ source: [ `src/tokens/functional/color/light/*.json5`, `src/tokens/functional/color/scales.json5`, - `src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5`, `src/tokens/functional/shadow/light.json5`, `src/tokens/functional/border/light.json5`, + `src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5`, ], include: [ `src/tokens/base/color/light/light.json5`, - `src/tokens/base/color/light/light.protanopia-deuteranopia.json5`, + // `src/tokens/base/color/light/light.protanopia-deuteranopia.json5`, ], }, { diff --git a/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 b/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 index 4b2cc1f95..6df014df2 100644 --- a/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 +++ b/src/tokens/functional/color/light/overrides/light.protanopia-deuteranopia.json5 @@ -5,6 +5,10 @@ */ { fgColor: { + success: { + $value: '{base.color.blue.5}', + $type: 'color', + }, open: { $value: '{base.color.orange.5}', $type: 'color', @@ -13,6 +17,14 @@ $value: '{base.color.gray.5}', $type: 'color', }, + danger: { + $value: '{base.color.orange.5}', + $type: 'color', + mix: { + color: '{base.color.orange.4}', + weight: 0.05, + }, + }, }, bgColor: { open: { @@ -103,4 +115,67 @@ }, }, }, + codeMirror: { + syntax: { + fgColor: { + keyword: { + $value: '{base.color.orange.5}', + $type: 'color', + }, + storage: { + $value: '{base.color.orange.5}', + $type: 'color', + }, + } + } + }, + color: { + ansi: { + green: { + $value: '{base.color.blue.6}', + $type: 'color', + }, + 'green-bright': { + $value: '{base.color.blue.5}', + $type: 'color', + }, + red: { + $value: '{base.color.orange.5}', + $type: 'color', + }, + 'red-bright': { + $value: '{base.color.orange.6}', + $type: 'color', + }, + }, + /** + * @description All overwrites for color scales + */ + scale: { + green: { + '0': {$value: '{base.color.blue.0}'}, + '1': {$value: '{base.color.blue.1}'}, + '2': {$value: '{base.color.blue.2}'}, + '3': {$value: '{base.color.blue.3}'}, + '4': {$value: '{base.color.blue.4}'}, + '5': {$value: '{base.color.blue.5}'}, + '6': {$value: '{base.color.blue.6}'}, + '7': {$value: '{base.color.blue.7}'}, + '8': {$value: '{base.color.blue.8}'}, + '9': {$value: '{base.color.blue.9}'}, + }, + red: { + '0': {$value: '{base.color.orange.0}'}, + '1': {$value: '{base.color.orange.1}'}, + '2': {$value: '{base.color.orange.2}'}, + '3': {$value: '{base.color.orange.3}'}, + '4': {$value: '{base.color.orange.4}'}, + '5': {$value: '{base.color.orange.5}'}, + '6': {$value: '{base.color.orange.6}'}, + '7': {$value: '{base.color.orange.7}'}, + '8': {$value: '{base.color.orange.8}'}, + '9': {$value: '{base.color.orange.9}'}, + }, + }, + }, }