# Text Colors Utilities for controlling the text color of an element. **Category:** Utilities **Storybook:** https://doc.ux4g.gov.in/web/?path=/story/ux4g-utilities-text-colors--introduction ## Variants documented in Storybook - TextColorsShowcase: https://doc.ux4g.gov.in/web/?path=/story/ux4g-utilities-text-colors--textcolorsshowcase ## Framework setup ### HTML / CDN ```html ``` ### React ```bash npm install ux4g-web-components ``` ```jsx import 'ux4g-web-components/styles.css'; import 'ux4g-web-components/design-system'; ``` ### Angular Update `angular.json`: ```json { "styles": [ "node_modules/ux4g-web-components/styles/ux4g.css", "src/styles.css" ], "scripts": [ "node_modules/ux4g-web-components/dist/runtime/design-system.js" ] } ``` ## Code examples The snippets below are extracted from the Storybook canvas for Text Colors. Each example shows the rendered HTML, the equivalent React JSX, and the Angular template markup. ### 1. Introduction — Introduction HTML: ```html
A comprehensive reference of semantic text color tokens and utility classes for the UX4G Design System.
Every text color class from the utility library, categorized for easy access.
Format: ux4g-text-{shade}
|
A
Neutral Primary
ux4g-text-neutral-primary
|
|
A
Neutral Secondary
ux4g-text-neutral-secondary
|
|
A
Neutral Tertiary
ux4g-text-neutral-tertiary
|
|
A
Neutral Inverse
ux4g-text-neutral-inverse
|
|
A
Neutral Emphasis
ux4g-text-neutral-emphasis
|
Format: ux4g-text-{color}
|
A
Primary
ux4g-text-primary
|
|
A
Secondary
ux4g-text-secondary
|
|
A
Tertiary
ux4g-text-tertiary
|
Format: ux4g-text-{color}
|
A
Success
ux4g-text-success
|
|
A
Error
ux4g-text-error
|
|
A
Warning
ux4g-text-warning
|
|
A
Info
ux4g-text-info
|
Format: ux4g-icon-{color}
|
Icon Success
ux4g-icon-success
|
|
Icon Error
ux4g-icon-error
|
|
Icon Warning
ux4g-icon-warning
|
|
Icon Info
ux4g-icon-info
|
Format: ux4g-text-link-{color}
|
A
Link
ux4g-text-link
|
|
A
Link Neutral
ux4g-text-link-neutral
|
|
A
Link Inverse
ux4g-text-link-inverse
|
|
A
Link Neutral Inverse
ux4g-text-link-neutral-inverse
|
Format: ux4g-text-{color}
|
A
White
ux4g-text-white
|
|
A
Black
ux4g-text-black
|
|
A
Error Default
ux4g-text-error-default
|
A comprehensive reference of semantic text color tokens and utility classes for the UX4G Design System.
Every text color class from the utility library, categorized for easy access.
Format:
ux4g-text-{shade}
|
A
Neutral Primary
ux4g-text-neutral-primary
|
|
A
Neutral Secondary
ux4g-text-neutral-secondary
|
|
A
Neutral Tertiary
ux4g-text-neutral-tertiary
|
|
A
Neutral Inverse
ux4g-text-neutral-inverse
|
|
A
Neutral Emphasis
ux4g-text-neutral-emphasis
|
Format:
ux4g-text-{color}
|
A
Primary
ux4g-text-primary
|
|
A
Secondary
ux4g-text-secondary
|
|
A
Tertiary
ux4g-text-tertiary
|
Format:
ux4g-text-{color}
|
A
Success
ux4g-text-success
|
|
A
Error
ux4g-text-error
|
|
A
Warning
ux4g-text-warning
|
|
A
Info
ux4g-text-info
|
Format:
ux4g-icon-{color}
|
A
Icon Success
ux4g-icon-success
|
|
A
Icon Error
ux4g-icon-error
|
|
A
Icon Warning
ux4g-icon-warning
|
|
A
Icon Info
ux4g-icon-info
|
Format:
ux4g-text-link-{color}
|
A
Link
ux4g-text-link
|
|
A
Link Neutral
ux4g-text-link-neutral
|
|
A
Link Inverse
ux4g-text-link-inverse
|
|
A
Link Neutral Inverse
ux4g-text-link-neutral-inverse
|
Format:
ux4g-text-{color}
|
A
White
ux4g-text-white
|
|
A
Black
ux4g-text-black
|
|
A
Error Default
ux4g-text-error-default
|
A comprehensive reference of semantic text color tokens and utility classes for the UX4G Design System.
Every text color class from the utility library, categorized for easy access.
Format: ux4g-text-{shade}
|
A
Neutral Primary
ux4g-text-neutral-primary
|
|
A
Neutral Secondary
ux4g-text-neutral-secondary
|
|
A
Neutral Tertiary
ux4g-text-neutral-tertiary
|
|
A
Neutral Inverse
ux4g-text-neutral-inverse
|
|
A
Neutral Emphasis
ux4g-text-neutral-emphasis
|
Format: ux4g-text-{color}
|
A
Primary
ux4g-text-primary
|
|
A
Secondary
ux4g-text-secondary
|
|
A
Tertiary
ux4g-text-tertiary
|
Format: ux4g-text-{color}
|
A
Success
ux4g-text-success
|
|
A
Error
ux4g-text-error
|
|
A
Warning
ux4g-text-warning
|
|
A
Info
ux4g-text-info
|
Format: ux4g-icon-{color}
|
Icon Success
ux4g-icon-success
|
|
Icon Error
ux4g-icon-error
|
|
Icon Warning
ux4g-icon-warning
|
|
Icon Info
ux4g-icon-info
|
Format: ux4g-text-link-{color}
|
A
Link
ux4g-text-link
|
|
A
Link Neutral
ux4g-text-link-neutral
|
|
A
Link Inverse
ux4g-text-link-inverse
|
|
A
Link Neutral Inverse
ux4g-text-link-neutral-inverse
|
Format: ux4g-text-{color}
|
A
White
ux4g-text-white
|
|
A
Black
ux4g-text-black
|
|
A
Error Default
ux4g-text-error-default
|