Skip to content

Commit

Permalink
rename RED_0, RED_1 to RED and CORAL respectively
Browse files Browse the repository at this point in the history
  • Loading branch information
mightbesimon committed Oct 25, 2022
1 parent d65da5c commit 1fc302c
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 35 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

> Author: [mightbesimon](https://github.com/mightbesimon)
## v0.99.99 — 27 July 2022

Initial pre-release
8 changes: 5 additions & 3 deletions colour/colour.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
explicit or implicit permission.
'''

from abc import ABC
from abc import ABC, abstractmethod
from dataclasses import dataclass
from decimal import Decimal
from typing import Tuple
Expand All @@ -18,13 +18,15 @@
class Colour(ABC):
''' abstract base `Colour` class
'''

@abstractmethod
def to_hsla(self) -> 'hsla':
raise NotImplemented

@abstractmethod
def to_rgba(self) -> 'rgba':
raise NotImplemented

@abstractmethod
def to_hex(self) -> str:
c = self.to_rgba()
alpha = f'{round(c.a*255):02x}' if c.a is not None and c.a!=1 else ''
Expand Down Expand Up @@ -121,7 +123,7 @@ def to_rgba(self) -> 'rgba':
@dataclass
class rgba(Colour):
''' `Colour` object in rgba space
optional
optional `r`: red `[0, 255]`
optional `g`: green `[0, 255]`
optional `b`: blue `[0, 255]`
Expand Down
13 changes: 11 additions & 2 deletions colour/palette.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,20 @@ class Mariana(Palette):
MEDIUM_2 = MARIANA.clone(l=45)
LIGHT_0 = hsla(220, 12, 69)
LIGHT_1 = hsla(220, 28, 88)
RED_0 = hsla(357, 79, 65)
RED_1 = hsla( 13, 93, 66)
RED = hsla(357, 79, 65)
CORAL = hsla( 13, 93, 66)
ORANGE = hsla( 32, 93, 66)
YELLOW = hsla( 40, 94, 68)
MINT = hsla(114, 31, 68)
TEAL = hsla(180, 36, 54)
BLUE = hsla(210, 50, 60)
PURPLE = hsla(300, 30, 68)

class HealthNow:
...

class Apple:
# RED
# YELLOW
# GREEN
LUCK = rgba(135, 188, 93)
60 changes: 30 additions & 30 deletions themes/mariana-reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"activityBar.background": "DARK_1",
"activityBar.dropBorder": "MINT",
"activityBar.activeBorder": "MINT",
"activityBarBadge.background": "RED_0",
"badge.background": "RED_0",
"activityBarBadge.background": "RED",
"badge.background": "RED",
"button.background": "MINT",
"button.foreground": "DARK_1",
"button.hoverBackground": "MINTc0",
"button.secondaryBackground": "ORANGE",
"button.secondaryHoverBackground": "ORANGEc0",
"diffEditor.insertedTextBackground": "MINT",
"diffEditor.removedTextBackground": "RED_1",
"diffEditor.removedTextBackground": "CORAL",
"dropdown.background": "DARK_2",
"dropdown.listBackground": "DARK_2",
"editor.foreground": "LIGHT_1",
Expand All @@ -39,8 +39,8 @@
"editorCursor.foreground": "ORANGE",
"editorLineNumber.foreground": "LIGHT_0c0",
"editorLineNumber.activeForeground": "LIGHT_1c0",
"editorError.foreground": "RED_0",
"editorError.background": "RED_040",
"editorError.foreground": "RED",
"editorError.background": "RED40",
"editorWarning.foreground": "YELLOW",
"editorWarning.background": "YELLOW40",
"editorInfo.foreground": "BLUE",
Expand All @@ -54,7 +54,7 @@
"editorGroupHeader.tabsBackground": "DARK_1",
"editorGutter.addedBackground": "MINT",
"editorGutter.modifiedBackground": "ORANGE",
"editorGutter.deletedBackground": "RED_0",
"editorGutter.deletedBackground": "RED",
"editorIndentGuide.background": "MEDIUM_1",
"editorOverviewRuler.findMatchForeground": "YELLOW40",
"editorOverviewRuler.rangeHighlightForeground": "YELLOW40",
Expand All @@ -63,8 +63,8 @@
"editorOverviewRuler.wordHighlightStrongForeground": "YELLOW40",
"editorOverviewRuler.addedForeground": "MINT",
"editorOverviewRuler.modifiedForeground": "ORANGE",
"editorOverviewRuler.deletedForeground": "RED_0",
"editorOverviewRuler.errorForeground": "RED_0",
"editorOverviewRuler.deletedForeground": "RED",
"editorOverviewRuler.errorForeground": "RED",
"editorOverviewRuler.warningForeground": "YELLOW",
"editorOverviewRuler.infoForeground": "BLUE",
"editorOverviewRuler.bracketMatchForeground": "TEAL",
Expand All @@ -88,13 +88,13 @@
"inputOption.activeBackground": "MINT",
"inputOption.activeForeground": "MEDIUM_0",
"inputOption.hoverBackground": "MINT80",
"inputValidation.errorBorder": "RED_0",
"inputValidation.errorBackground": "RED_0c0",
"inputValidation.errorBorder": "RED",
"inputValidation.errorBackground": "REDc0",
"inputValidation.warningBorder": "YELLOW",
"inputValidation.warningBackground": "YELLOWc0",
"inputValidation.infoBorder": "BLUE",
"inputValidation.infoBackground": "BLUEc0",
"list.errorForeground": "RED_0",
"list.errorForeground": "RED",
"list.warningForeground": "YELLOW",
"list.dropBackground": "MINT80",
"list.activeSelectionBackground": "MEDIUM_0",
Expand All @@ -104,18 +104,18 @@
"list.hoverBackground": "DARK_2",
"listFilterWidget.background": "MINT",
"listFilterWidget.outline": "MINT",
"listFilterWidget.noMatchesOutline": "RED_0",
"listFilterWidget.noMatchesOutline": "RED",
"merge.currentContentBackground": "#FAB76340",
"merge.currentHeaderBackground": "#FAB76370",
"merge.incomingContentBackground": "#A3CE9E40",
"merge.incomingHeaderBackground": "#A3CE9E70",
"minimap.background": "MEDIUM_0e0",
"minimap.errorHighlight": "RED_0",
"minimap.errorHighlight": "RED",
"minimap.warningHighlight": "YELLOW",
"minimap.findMatchHighlight": "TEAL",
"minimap.selectionHighlight": "MEDIUM_1",
"minimap.selectionOccurrenceHighlight": "MEDIUM_1",
"minimapGutter.deletedBackground": "RED_0",
"minimapGutter.deletedBackground": "RED",
"minimapGutter.modifiedBackground": "ORANGE",
"minimapGutter.addedBackground": "MINT",
"notificationCenterHeader.background": "SHADOW",
Expand All @@ -128,7 +128,7 @@
"peekViewEditor.matchHighlightBackground": "DARK_1c0",
"peekViewResult.background": "DARK_1c0",
"peekViewTitle.background": "DARK_1c0",
"problemsErrorIcon.foreground": "RED_0",
"problemsErrorIcon.foreground": "RED",
"problemsWarningIcon.foreground": "YELLOW",
"problemsInfoIcon.foreground": "BLUE",
"progressBar.background": "DARK_1",
Expand Down Expand Up @@ -169,15 +169,15 @@
"tab.unfocusedHoverForeground": "LIGHT_1",
"terminal.ansiBlack": "DARK_1",
"terminal.ansiWhite": "LIGHT_1",
"terminal.ansiRed": "RED_0",
"terminal.ansiRed": "RED",
"terminal.ansiYellow": "YELLOW",
"terminal.ansiGreen": "MINT",
"terminal.ansiCyan": "TEAL",
"terminal.ansiBlue": "BLUE",
"terminal.ansiMagenta": "PURPLE",
"terminal.ansiBrightBlack": "DARK_1",
"terminal.ansiBrightWhite": "LIGHT_1",
"terminal.ansiBrightRed": "RED_0",
"terminal.ansiBrightRed": "RED",
"terminal.ansiBrightYellow": "YELLOW",
"terminal.ansiBrightGreen": "MINT",
"terminal.ansiBrightCyan": "TEAL",
Expand All @@ -191,7 +191,7 @@
"textBlockQuote.background": "MEDIUM_1",
"textLink.activeForeground": "BLUEc0",
"textLink.foreground": "BLUE",
"textPreformat.foreground": "RED_1",
"textPreformat.foreground": "CORAL",
"titleBar.activeBackground": "DARK_1",
"titleBar.activeForeground": "LIGHT_1",
"titleBar.inactiveBackground": "DARK_1",
Expand Down Expand Up @@ -239,7 +239,7 @@
"name": "Built-in constant",
"scope": "constant.language",
"settings": {
"foreground": "RED_0",
"foreground": "RED",
"fontStyle": "italic"
}
},
Expand All @@ -257,7 +257,7 @@
"name": "Member Variable",
"scope": "variable.member",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
Expand All @@ -275,7 +275,7 @@
"name": "Operators",
"scope": "keyword.operator",
"settings": {
"foreground": "RED_1"
"foreground": "CORAL"
}
},
{
Expand Down Expand Up @@ -325,7 +325,7 @@
"name": "Storage",
"scope": "storage",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
Expand Down Expand Up @@ -374,15 +374,15 @@
"name": "Language variable",
"scope": "variable.language",
"settings": {
"foreground": "RED_0",
"foreground": "RED",
"fontStyle": "italic"
}
},
{
"name": "Tag name",
"scope": "entity.name.tag",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
Expand Down Expand Up @@ -436,7 +436,7 @@
"name": "Invalid",
"scope": "invalid",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
Expand Down Expand Up @@ -471,14 +471,14 @@
"name": "markup headings",
"scope": "markup.heading punctuation.definition.heading",
"settings": {
"foreground": "RED_1"
"foreground": "CORAL"
}
},
{
"name": "markup h1",
"scope": "markup.heading.1 punctuation.definition.heading",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
Expand Down Expand Up @@ -622,7 +622,7 @@
"name": "diff.deleted",
"scope": "markup.deleted",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
Expand All @@ -649,13 +649,13 @@
{
"scope": "constant.numeric.line-number.match",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
"scope": "message.error",
"settings": {
"foreground": "RED_0"
"foreground": "RED"
}
},
{
Expand Down

0 comments on commit 1fc302c

Please sign in to comment.