Catppuccin Frappé catppuccin dark
readability67/100dark93%bg#303446fg#c6d0f5bg hue229°fg hue227°mean lightness63%saturation44%warmth+0.00mean hue270° violethue variation90°distinct hues9avg contrast5.3fg contrast8.1text on bgwhiteachromatic0
Colors
rosewater
flamingo
pink
mauve
red
maroon
peach
yellow
green
teal
sky
sapphire
blue
lavender
text
subtext1
subtext0
overlay2
overlay1
overlay0
surface2
surface1
surface0
base
mantle
crust
roygcbpb
Ramp is sorted by WCAG relative luminance; the strip maps the 8 ANSI roles (base08–base0F).
Code sample
package main
import "fmt"
const (
Version = "1.2.0" // release
MaxTries = 3
)
type Server struct {
Host string
Port int
}
func (s *Server) start(tls bool) error {
addr := fmt.Sprintf("%s:%d", s.Host, s.Port)
if tls {
return listen(addr, 443)
}
return listen(addr, 80)
}
#!/usr/bin/env python3
# syntax sample: hex to hsl
import math
def hex_to_hsl(hex_code):
r = int(hex_code[1:3], 16) / 255
g = int(hex_code[3:5], 16) / 255
b = int(hex_code[5:7], 16) / 255
mx = max(r, g, b)
mn = min(r, g, b)
l = (mx + mn) / 2
return round(l * 100)
#!/bin/sh
# build the project and run tests
set -e
PREFIX="$HOME/.local"
VERSION="1.2.0"
for pkg in gcc make git; do
if ! command -v "$pkg" >/dev/null 2>&1; then
echo "missing dependency: $pkg"
fi
done
echo "building v$VERSION"
make -j4 && make test
Analysis
WCAG contrast matrix
| vs | rosewater | flamingo | pink | mauve | red | maroon | peach | yellow | green | teal | sky | sapphire | blue | lavender | text | subtext1 | subtext0 | overlay2 | overlay1 | overlay0 | surface2 | surface1 | surface0 | base |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| rosewater | · | 1.2 | 1.2 | 1.6 | 1.9 | 1.6 | 1.5 | 1.2 | 1.3 | 1.4 | 1.2 | 1.4 | 1.7 | 1.3 | 1.1 | 1.3 | 1.6 | 2.0 | 2.4 | 3.1 | 4.0 | 5.2 | 6.8 | 8.9 |
| flamingo | 1.2 | · |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| 5.8 | 4.3 | 3.6 | 4.3 | 4.5 | 5.9 | 5.5 | 4.9 | 5.6 | 4.8 | 4.1 | 5.2 | 6.2 | 5.2 | 4.3 | 3.5 | 2.8 | 2.2 | 1.7 | 1.3 | · | 1.3 |
| base | 8.9 | 7.5 | 7.5 | 5.6 | 4.6 | 5.6 | 5.8 | 7.6 | 7.1 | 6.4 | 7.3 | 6.3 | 5.3 | 6.7 | 8.1 | 6.8 | 5.6 | 4.5 | 3.6 | 2.9 | 2.2 | 1.7 | 1.3 | · |
Each cell is the WCAG contrast ratio between the row color and the column color (darker cell = higher ratio). ≥4.5 passes AA for normal text, ≥7 passes AAA.
Terminal
user@host:~/dev/scheme$ ls -la -rw-r--r-- 8.9K user main.go -rw-r--r-- 5.8K user preview.go -rwxr-xr-x 9.9M user colorexplorer drwxr-xr-x 4096 user cache/ lrwxrwxrwx 11 user site -> public -rw-r--r-- 2400 user bundle.zip user@host:~/dev/scheme$ git diff --stat diff --git a/main.go b/main.go --- a/main.go +++ b/main.go @@ -12,7 +12,8 @@ - addr := ":8080" + addr := ":9090"