Generator Tools
String to Color
Turn any text into a consistent color that never changes. Map usernames, tags, or labels to hex, RGB, HSL, and OKLCH, with the readable text color for each.
String to color generator
Rotates every generated hue by the same amount. Output stays deterministic: the same string and settings always give the same color. Use this to shift a whole set away from clashing brand colors.
Single string
Hash
FNV-1a 32-bit: 2570459880 (0x99361ae8)
Text contrast on this color
Batch list
One string per line. Each gets its own stable color. Duplicates are shown once.
- alice#2b2ec5
- bob#9d38c2
- carol#c6342f
- dave#d89146
- erin#cd793c
- frank#d89b46
- grace#abbc2f
- heidi#c28824
Export
Copy every mapping in one format.
:root {
--color-alice: #2b2ec5;
--color-bob: #9d38c2;
--color-carol: #c6342f;
--color-dave: #d89146;
--color-erin: #cd793c;
--color-frank: #d89b46;
--color-grace: #abbc2f;
--color-heidi: #c28824;
}Colors are computed from your text in the browser with a fixed formula, so the same string and settings always produce the same color. Nothing is uploaded.
How to use
- Type a username, tag, email, or any text in the single string box to see its stable color.
- Pick a palette such as Balanced, Pastel, Vivid, Dark, Light, or Muted to set the saturation and lightness range.
- Drag the hue shift slider to rotate every color while keeping each result deterministic.
- Read the hex, RGB, HSL, and OKLCH values and the WCAG contrast for black and white text, then copy what you need.
- Paste a list in the batch box, one string per line, and export every mapping as CSS variables, JSON, or CSV.
About this tool
String to Color maps any piece of text to a color using a fixed formula, so the same input always returns the same color. That repeatability is the whole point and is what separates this from a random color generator: it is meant for cases where a value needs a stable color every time it appears, such as a colored avatar for each username, a chip color for each tag or category, an event color in a calendar, a series color in a chart, or a consistent color for an id in logs and dashboards. The tool hashes the UTF-8 bytes of your text with the FNV-1a 32-bit algorithm, a fast non-cryptographic hash that is well distributed for short strings, then derives a hue from the hash and reads saturation and lightness from the palette window you pick. Six palettes are included: Balanced for general labels and avatars, Pastel for soft tints on light backgrounds, Vivid for energetic chart accents, Dark for white text on dark interfaces, Light for chips with dark text, and Muted for calm, desaturated dashboards. A hue shift slider rotates every generated hue by the same amount so you can move a whole set away from a clashing brand color while keeping every result deterministic. For a single string the tool shows the color preview with the exact FNV-1a hash, the value in hex, RGB, HSL, and OKLCH each with its own copy button, and the WCAG 2.x contrast ratio of both black and white text on that color so you can see which foreground is readable; the preview automatically uses whichever of black or white has the higher contrast. A batch mode takes a list of strings, one per line, de-duplicates repeated values, and renders a stable color for each as a labeled swatch with a two-letter monogram, then lets you export the whole mapping as CSS custom properties, JSON, or CSV ready to drop into a stylesheet or a data layer. An empty string still produces a valid color, and the FNV-1a hash is used only to choose a color, not for security or integrity. Everything runs in your browser. Your text is never uploaded.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Random Color Generator
Roll random hex, RGB, HSL, and OKLCH colors with mood presets, locks, and exports.
Open tool
GeneratorColor Palette Generator
Build complementary, analogous, triadic, and monochromatic color schemes from any HEX.
Open tool
GeneratorColor Harmony Generator
Build complementary, triadic, tetradic, analogous, and monochromatic palettes.
Open tool
ConverterHEX to RGB Converter
Convert HEX, RGB, RGBA, and HSL with a live preview.
Open tool
ConverterColor Format Converter
Convert any CSS color to HEX, RGB, HSL, HWB, CMYK, and named values at once.
Open tool
ImageInitials Avatar Generator
Build user-profile avatars from initials with auto colours, custom shapes, and PNG or SVG export.
Open tool