Skip to content

Commit

Permalink
feat: bring back 0.6 opacity red in demo example
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardspy committed Mar 30, 2024
1 parent 8aba442 commit 53dffb7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
13 changes: 7 additions & 6 deletions whiskers/examples/demo/input.tera
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ whiskers:
**flavor:** {{ flavor.name }}

### Colours
{% set lightred = red | add(lightness=10) -%}
{% set darkred = red | sub(lightness=10) -%}
{% set palered = red | mix(color=base, amount=0.3) -%}
{% set fadered1 = red | mod(opacity=0.6) -%}
{% set fadered2 = red | mod(opacity=0.5) -%}

- **red:** #{{ red.hex }} / {{ css_rgb(color=red) }} / {{ css_hsl(color=red) }}
- **components:** r: {{ red.rgb.r }} / {{ red.rgb.r / 255 | trunc(places=2) }}, g: {{ red.rgb.g }} / {{ red.rgb.g / 255 | trunc(places=2) }}, b: {{ red.rgb.b }} / {{ red.rgb.b / 255 | trunc(places=2) }}
- **alpha:** {{ red.opacity }} / {{ red.opacity / 255 | trunc(places=2) }}
{% set lightred = red | add(lightness=10) -%}
- **alpha:** {{ fadered1.opacity }} / {{ fadered1.opacity / 255 | trunc(places=2) }}
- **10% lighter:** #{{ lightred.hex }} / {{ css_rgb(color=lightred) }} / {{ css_hsl(color=lightred) }}
{% set darkred = red | sub(lightness=10) -%}
- **10% darker:** #{{ darkred.hex }} / {{ css_rgb(color=darkred) }} / {{ css_hsl(color=darkred) }}

{% set palered = red | mix(color=base, amount=0.3) -%}
- **30% mix with base:** #{{ palered.hex }} / {{ css_rgb(color=palered) }} / {{ css_hsl(color=palered) }}

{% set fadered = red | mod(opacity=0.5) -%}
- **50% opacity:** #{{ fadered.hex }} / {{ css_rgba(color=fadered) }} / {{ css_hsla(color=fadered) }}
- **50% opacity:** #{{ fadered2.hex }} / {{ css_rgba(color=fadered2) }} / {{ css_hsla(color=fadered2) }}

### Conditionals

Expand Down
3 changes: 1 addition & 2 deletions whiskers/examples/demo/output/frappe.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
**flavor:** Frappé

### Colours

- **red:** #e78284 / rgb(231, 130, 132) / hsl(359, 68%, 71%)
- **components:** r: 231 / 0.91, g: 130 / 0.51, b: 132 / 0.52
- **alpha:** 255 / 1.00
- **alpha:** 153 / 0.60
- **10% lighter:** #f0aeb0 / rgb(240, 174, 176) / hsl(359, 68%, 81%)
- **10% darker:** #df5759 / rgb(223, 87, 89) / hsl(359, 68%, 61%)

Expand Down
3 changes: 1 addition & 2 deletions whiskers/examples/demo/output/latte.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
**flavor:** Latte

### Colours

- **red:** #d20f39 / rgb(210, 15, 57) / hsl(347, 87%, 44%)
- **components:** r: 210 / 0.82, g: 15 / 0.06, b: 57 / 0.22
- **alpha:** 255 / 1.00
- **alpha:** 153 / 0.60
- **10% lighter:** #f02652 / rgb(240, 38, 82) / hsl(347, 87%, 55%)
- **10% darker:** #a20c2c / rgb(162, 12, 44) / hsl(347, 87%, 34%)

Expand Down
3 changes: 1 addition & 2 deletions whiskers/examples/demo/output/macchiato.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
**flavor:** Macchiato

### Colours

- **red:** #ed8796 / rgb(237, 135, 150) / hsl(351, 74%, 73%)
- **components:** r: 237 / 0.93, g: 135 / 0.53, b: 150 / 0.59
- **alpha:** 255 / 1.00
- **alpha:** 153 / 0.60
- **10% lighter:** #f4b4be / rgb(244, 180, 190) / hsl(351, 74%, 83%)
- **10% darker:** #e65a6f / rgb(230, 90, 111) / hsl(351, 74%, 63%)

Expand Down
3 changes: 1 addition & 2 deletions whiskers/examples/demo/output/mocha.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
**flavor:** Mocha

### Colours

- **red:** #f38ba8 / rgb(243, 139, 168) / hsl(343, 81%, 75%)
- **components:** r: 243 / 0.95, g: 139 / 0.55, b: 168 / 0.66
- **alpha:** 255 / 1.00
- **alpha:** 153 / 0.60
- **10% lighter:** #f8bacc / rgb(248, 186, 204) / hsl(343, 81%, 85%)
- **10% darker:** #ee5c85 / rgb(238, 92, 133) / hsl(343, 81%, 65%)

Expand Down

0 comments on commit 53dffb7

Please sign in to comment.