| 1 | package App::Greple::colors; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | colors - Greple module for various colormap | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | greple -Mcolors --light ... | ||
| 10 | |||
| 11 | greple -Mcolors --dark ... | ||
| 12 | |||
| 13 | greple -Mcolors --solarized ... | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | Provides predefined color schemes optimized for light, dark, and | ||
| 18 | Solarized terminal backgrounds. All colors use | ||
| 19 | L<Term::ANSIColor::Concise> format. | ||
| 20 | |||
| 21 | =head2 COLOR FORMAT | ||
| 22 | |||
| 23 | =over 4 | ||
| 24 | |||
| 25 | =item B<RGB format> (e.g., C<K/544>, C<555/100>) | ||
| 26 | |||
| 27 | 3-digit RGB values (0-5 each) for 216-color palette. Format is | ||
| 28 | C<foreground/background>. C<K> means black, C<W> means white. | ||
| 29 | |||
| 30 | =item B<Hex format> (e.g., C<#002b36>, C<080808>) | ||
| 31 | |||
| 32 | 6-digit hexadecimal RGB values for 24-bit true color. | ||
| 33 | |||
| 34 | =item B<Grey levels> (e.g., C<L01> - C<L24>) | ||
| 35 | |||
| 36 | 24-level greyscale from dark (L01) to light (L24). | ||
| 37 | |||
| 38 | =back | ||
| 39 | |||
| 40 | =head1 OPTIONS | ||
| 41 | |||
| 42 | =over 4 | ||
| 43 | |||
| 44 | =item B<--light> | ||
| 45 | |||
| 46 | Color scheme for light background terminals. Uses dark foreground | ||
| 47 | colors on lighter backgrounds. | ||
| 48 | |||
| 49 | =item B<--dark> | ||
| 50 | |||
| 51 | Color scheme for dark background terminals. Uses light foreground | ||
| 52 | colors on darker backgrounds. | ||
| 53 | |||
| 54 | =item B<--bright> | ||
| 55 | |||
| 56 | Alias for B<--light>. | ||
| 57 | |||
| 58 | =item B<--grey24> | ||
| 59 | |||
| 60 | =item B<--grey24-bg> | ||
| 61 | |||
| 62 | 24-level greyscale colors. B<--grey24> uses grey foreground colors, | ||
| 63 | B<--grey24-bg> uses grey background with contrasting foreground. | ||
| 64 | |||
| 65 | =item B<--greyhex> | ||
| 66 | |||
| 67 | =item B<--greyhex-bg> | ||
| 68 | |||
| 69 | 24-level greyscale using hex color codes for true color terminals. | ||
| 70 | |||
| 71 | =item B<--solarized> | ||
| 72 | |||
| 73 | =item B<--solarized-fg> | ||
| 74 | |||
| 75 | =item B<--solarized-bg> | ||
| 76 | |||
| 77 | Ethan Schoonover's Solarized color palette. B<--solarized> is an | ||
| 78 | alias for B<--solarized-fg>. B<--solarized-bg> uses Solarized colors | ||
| 79 | as background. | ||
| 80 | |||
| 81 | =back | ||
| 82 | |||
| 83 | =head1 SEE ALSO | ||
| 84 | |||
| 85 | L<App::Greple>, L<Term::ANSIColor::Concise> | ||
| 86 | |||
| 87 | =head2 Color Adjustment | ||
| 88 | |||
| 89 | L<Term::ANSIColor::Concise> provides color adjustment modifiers that | ||
| 90 | can be appended to any color specification. This allows you to | ||
| 91 | customize colors without modifying this module. | ||
| 92 | |||
| 93 | Modifier format: C<[+-=*][parameter][value]> | ||
| 94 | |||
| 95 | l - Lightness (0-100) <red>+l20 (lighter red) | ||
| 96 | y - Luminance (0-100) <blue>-y10 (darker blue) | ||
| 97 | s - Saturation (0-100) <green>=s50 (less saturated) | ||
| 98 | h - Hue shift (degrees) <red>+h30 (shift toward orange) | ||
| 99 | c - Complement <red>c (cyan) | ||
| 100 | i - RGB Inverse <blue>i (yellow) | ||
| 101 | g - Grayscale <red>g | ||
| 102 | |||
| 103 | Example: | ||
| 104 | |||
| 105 | greple --cm '<red>+l20,<blue>-s10,<green>+h15' | ||
| 106 | |||
| 107 | See L<Term::ANSIColor::Concise> for complete documentation. | ||
| 108 | |||
| 109 | =head2 Solarized | ||
| 110 | |||
| 111 | Solarized is a sixteen color palette designed by Ethan Schoonover for | ||
| 112 | use with terminal and GUI applications. | ||
| 113 | |||
| 114 | =over 4 | ||
| 115 | |||
| 116 | =item L<https://ethanschoonover.com/solarized/> | ||
| 117 | |||
| 118 | Official Solarized homepage. | ||
| 119 | |||
| 120 | =item L<https://github.com/altercation/solarized> | ||
| 121 | |||
| 122 | Solarized repository with color values and ports for various applications. | ||
| 123 | |||
| 124 | =back | ||
| 125 | |||
| 126 | =cut | ||
| 127 | |||
| 128 | 1 | ▶ | use v5.24; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 129 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 130 | |||
| 131 | 1 | 1; | |
| 132 | |||
| 133 | __DATA__ | ||