status-from-accent
Status Colors from Accent
Generate a complete set of status/feedback colors (success, warning, danger, info) that are mathematically related to your brand color using square harmony.
When to Use
- "Create status colors that match my brand"
- "I need success, warning, error colors"
- "Generate feedback colors from my accent"
- "Make danger/success colors that feel on-brand"
Installation
npx @basiclines/rampa
The Square Harmony Approach
Square harmony generates 4 colors at 90° intervals on the color wheel. This gives you maximum distinction while maintaining mathematical relationships.
rampa -C "<brand-color>" --add=square -L 95:15 --size=10 -O css
This outputs 4 ramps:
base- your brand color (use as info/primary)square-1- +90° rotationsquare-2- +180° rotation (opposite)square-3- +270° rotation
Mapping Hues to Status
The actual colors depend on your input. After generation, map based on hue:
| Hue Range | Typical Status |
|---|---|
| 80-150° | Success (green/teal) |
| 30-80° | Warning (yellow/orange) |
| 0-30° or 330-360° | Danger (red/pink) |
| 180-270° | Info (blue/purple) |
Example: If your brand is blue (#3b82f6, ~220°):
- base (220°) → Info
- square-1 (310°) → Danger (magenta/red zone)
- square-2 (40°) → Warning (orange zone)
- square-3 (130°) → Success (green zone)
Complete Example
# Generate all 4 status ramps from blue brand
rampa -C "#3b82f6" --add=square -L 95:15 --size=10 -O css
Output includes 4 full ramps - assign semantic meaning based on hue:
:root {
/* Info (base - blue) */
--base-0: #eff6ff;
--base-5: #3b82f6;
--base-9: #1e3a8a;
/* Danger (square-1 - magenta/red) */
--square-1-0: #fdf2f8;
--square-1-5: #ec4899;
--square-1-9: #831843;
/* Warning (square-2 - orange) */
--square-2-0: #fff7ed;
--square-2-5: #f97316;
--square-2-9: #7c2d12;
/* Success (square-3 - green) */
--square-3-0: #f0fdf4;
--square-3-5: #22c55e;
--square-3-9: #14532d;
}
Renaming for Semantics
After identifying which ramp is which, you can re-run with explicit names:
# If you know square-3 is your green/success
rampa -C "#22c55e" -L 95:15 --size=10 -O css --name=success
Or map in your CSS:
:root {
--success: var(--square-3-5);
--warning: var(--square-2-5);
--danger: var(--square-1-5);
--info: var(--base-5);
}
Alternative: Custom Status Base
If the generated hues don't land exactly where you want, adjust the input:
# Start from green to ensure success is the base
rampa -C "#22c55e" --add=square -L 95:15 --size=10 -O css
# Now: base=green, square-1=blue, square-2=red, square-3=yellow
Tips
- Square harmony guarantees maximum visual distinction
- All 4 colors share the same "mathematical DNA"
- The
-L 95:15range works well for status colors (light bg, dark text) - Use
--size=10for full ramp,--size=5for minimal - Mid-ramp values (4-6) work best for badges, buttons, alerts
More from basiclines/rampa-studio
rampa-colors
Generate mathematically accurate color palettes using OKLCH color space. Use when creating design systems, color ramps, accessible palettes, CSS variables for themes, or when user asks about color generation.
36accessible-contrast
Generate color ramps designed for WCAG-compliant contrast pairing. Creates 11-step scales with predictable foreground/background combinations.
35theme-foundation
Create a complete theme foundation with accent, secondary, and neutral color ramps from a single brand color. Use when building light/dark mode themes or starting a new design system.
32data-viz-palette
Generate distinct, accessible colors for charts, graphs, and data visualizations. Uses color harmonies for maximum perceptual distinction.
30tinted-neutrals
Generate neutral gray palettes with subtle brand color tinting. Use when you want grays that feel connected to your brand rather than pure neutral grays.
27brand-expansion
Expand a single brand color into a complete multi-hue color system using harmonies. Creates primary, analogous, complementary, and split-complementary ramps.
26