Utilities
Text Outline Color
The Text Outline Color
utility provides a way to set the outline color of text within UI elements, enhancing readability or visual appeal against various backgrounds.
Utility Class | USS Properties |
---|---|
text-outline-transparent | -unity-text-outline-color: rgba(0, 0, 0, 0); |
text-outline-slate-50 | -unity-text-outline-color: #F8FAFC; |
text-outline-slate-100 | -unity-text-outline-color: #F1F5F9; |
text-outline-slate-200 | -unity-text-outline-color: #E2E8F0; |
text-outline-slate-300 | -unity-text-outline-color: #CBD5E1; |
text-outline-slate-400 | -unity-text-outline-color: #94A3B8; |
text-outline-slate-500 | -unity-text-outline-color: #64748B; |
text-outline-slate-600 | -unity-text-outline-color: #475569; |
text-outline-slate-700 | -unity-text-outline-color: #334155; |
text-outline-slate-800 | -unity-text-outline-color: #1E293B; |
text-outline-slate-900 | -unity-text-outline-color: #0F172A; |
text-outline-slate-950 | -unity-text-outline-color: #020617; |
text-outline-gray-50 | -unity-text-outline-color: #F9FAFB; |
text-outline-gray-100 | -unity-text-outline-color: #F3F4F6; |
text-outline-gray-200 | -unity-text-outline-color: #E5E7EB; |
text-outline-gray-300 | -unity-text-outline-color: #D1D5DB; |
text-outline-gray-400 | -unity-text-outline-color: #9CA3AF; |
text-outline-gray-500 | -unity-text-outline-color: #6B7280; |
text-outline-gray-600 | -unity-text-outline-color: #4B5563; |
text-outline-gray-700 | -unity-text-outline-color: #374151; |
text-outline-gray-800 | -unity-text-outline-color: #1F2937; |
text-outline-gray-900 | -unity-text-outline-color: #111827; |
text-outline-gray-950 | -unity-text-outline-color: #030712; |
text-outline-zinc-50 | -unity-text-outline-color: #FAFAFA; |
text-outline-zinc-100 | -unity-text-outline-color: #F4F4F5; |
text-outline-zinc-200 | -unity-text-outline-color: #E4E4E7; |
text-outline-zinc-300 | -unity-text-outline-color: #D4D4D8; |
text-outline-zinc-400 | -unity-text-outline-color: #A1A1AA; |
text-outline-zinc-500 | -unity-text-outline-color: #71717A; |
text-outline-zinc-600 | -unity-text-outline-color: #52525B; |
text-outline-zinc-700 | -unity-text-outline-color: #3F3F46; |
text-outline-zinc-800 | -unity-text-outline-color: #27272A; |
text-outline-zinc-900 | -unity-text-outline-color: #18181B; |
text-outline-zinc-950 | -unity-text-outline-color: #09090B; |
text-outline-neutral-50 | -unity-text-outline-color: #FAFAFA; |
text-outline-neutral-100 | -unity-text-outline-color: #F5F5F5; |
text-outline-neutral-200 | -unity-text-outline-color: #E5E5E5; |
text-outline-neutral-300 | -unity-text-outline-color: #D4D4D4; |
text-outline-neutral-400 | -unity-text-outline-color: #A3A3A3; |
text-outline-neutral-500 | -unity-text-outline-color: #737373; |
text-outline-neutral-600 | -unity-text-outline-color: #525252; |
text-outline-neutral-700 | -unity-text-outline-color: #404040; |
text-outline-neutral-800 | -unity-text-outline-color: #262626; |
text-outline-neutral-900 | -unity-text-outline-color: #171717; |
text-outline-neutral-950 | -unity-text-outline-color: #0A0A0A; |
text-outline-stone-50 | -unity-text-outline-color: #FAFAF9; |
text-outline-stone-100 | -unity-text-outline-color: #F5F5F4; |
text-outline-stone-200 | -unity-text-outline-color: #E7E5E4; |
text-outline-stone-300 | -unity-text-outline-color: #D6D3D1; |
text-outline-stone-400 | -unity-text-outline-color: #A8A29E; |
text-outline-stone-500 | -unity-text-outline-color: #78716C; |
text-outline-stone-600 | -unity-text-outline-color: #57534E; |
text-outline-stone-700 | -unity-text-outline-color: #44403C; |
text-outline-stone-800 | -unity-text-outline-color: #292524; |
text-outline-stone-900 | -unity-text-outline-color: #1C1917; |
text-outline-stone-950 | -unity-text-outline-color: #0C0A09; |
text-outline-red-50 | -unity-text-outline-color: #FEF2F2; |
text-outline-red-100 | -unity-text-outline-color: #FEE2E2; |
text-outline-red-200 | -unity-text-outline-color: #FECACA; |
text-outline-red-300 | -unity-text-outline-color: #FCA5A5; |
text-outline-red-400 | -unity-text-outline-color: #F87171; |
text-outline-red-500 | -unity-text-outline-color: #EF4444; |
text-outline-red-600 | -unity-text-outline-color: #DC2626; |
text-outline-red-700 | -unity-text-outline-color: #B91C1C; |
text-outline-red-800 | -unity-text-outline-color: #991B1B; |
text-outline-red-900 | -unity-text-outline-color: #7F1D1D; |
text-outline-red-950 | -unity-text-outline-color: #450A0A; |
text-outline-orange-50 | -unity-text-outline-color: #FFF7ED; |
text-outline-orange-100 | -unity-text-outline-color: #FFEDD5; |
text-outline-orange-200 | -unity-text-outline-color: #FED7AA; |
text-outline-orange-300 | -unity-text-outline-color: #FDBA74; |
text-outline-orange-400 | -unity-text-outline-color: #FB923C; |
text-outline-orange-500 | -unity-text-outline-color: #F97316; |
text-outline-orange-600 | -unity-text-outline-color: #EA580C; |
text-outline-orange-700 | -unity-text-outline-color: #C2410C; |
text-outline-orange-800 | -unity-text-outline-color: #9A3412; |
text-outline-orange-900 | -unity-text-outline-color: #7C2D12; |
text-outline-orange-950 | -unity-text-outline-color: #431407; |
text-outline-amber-50 | -unity-text-outline-color: #FFFBEB; |
text-outline-amber-100 | -unity-text-outline-color: #FEF3C7; |
text-outline-amber-200 | -unity-text-outline-color: #FDE68A; |
text-outline-amber-300 | -unity-text-outline-color: #FCD34D; |
text-outline-amber-400 | -unity-text-outline-color: #FBBF24; |
text-outline-amber-500 | -unity-text-outline-color: #F59E0B; |
text-outline-amber-600 | -unity-text-outline-color: #D97706; |
text-outline-amber-700 | -unity-text-outline-color: #B45309; |
text-outline-amber-800 | -unity-text-outline-color: #92400E; |
text-outline-amber-900 | -unity-text-outline-color: #78350F; |
text-outline-amber-950 | -unity-text-outline-color: #451A03; |
text-outline-yellow-50 | -unity-text-outline-color: #FEFCE8; |
text-outline-yellow-100 | -unity-text-outline-color: #FEF9C3; |
text-outline-yellow-200 | -unity-text-outline-color: #FEF08A; |
text-outline-yellow-300 | -unity-text-outline-color: #FDE047; |
text-outline-yellow-400 | -unity-text-outline-color: #FACC15; |
text-outline-yellow-500 | -unity-text-outline-color: #EAB308; |
text-outline-yellow-600 | -unity-text-outline-color: #CA8A04; |
text-outline-yellow-700 | -unity-text-outline-color: #A16207; |
text-outline-yellow-800 | -unity-text-outline-color: #854D0E; |
text-outline-yellow-900 | -unity-text-outline-color: #713F12; |
text-outline-yellow-950 | -unity-text-outline-color: #422006; |
text-outline-lime-50 | -unity-text-outline-color: #F7FEE7; |
text-outline-lime-100 | -unity-text-outline-color: #ECFCCB; |
text-outline-lime-200 | -unity-text-outline-color: #D9F99D; |
text-outline-lime-300 | -unity-text-outline-color: #BEF264; |
text-outline-lime-400 | -unity-text-outline-color: #A3E635; |
text-outline-lime-500 | -unity-text-outline-color: #84CC16; |
text-outline-lime-600 | -unity-text-outline-color: #65A30D; |
text-outline-lime-700 | -unity-text-outline-color: #4D7C0F; |
text-outline-lime-800 | -unity-text-outline-color: #3F6212; |
text-outline-lime-900 | -unity-text-outline-color: #365314; |
text-outline-lime-950 | -unity-text-outline-color: #1A2E05; |
text-outline-green-50 | -unity-text-outline-color: #F0FDF4; |
text-outline-green-100 | -unity-text-outline-color: #DCFCE7; |
text-outline-green-200 | -unity-text-outline-color: #BBF7D0; |
text-outline-green-300 | -unity-text-outline-color: #86EFAC; |
text-outline-green-400 | -unity-text-outline-color: #4ADE80; |
text-outline-green-500 | -unity-text-outline-color: #22C55E; |
text-outline-green-600 | -unity-text-outline-color: #16A34A; |
text-outline-green-700 | -unity-text-outline-color: #15803D; |
text-outline-green-800 | -unity-text-outline-color: #166534; |
text-outline-green-900 | -unity-text-outline-color: #14532D; |
text-outline-green-950 | -unity-text-outline-color: #052E16; |
text-outline-emerald-50 | -unity-text-outline-color: #ECFDF5; |
text-outline-emerald-100 | -unity-text-outline-color: #D1FAE5; |
text-outline-emerald-200 | -unity-text-outline-color: #A7F3D0; |
text-outline-emerald-300 | -unity-text-outline-color: #6EE7B7; |
text-outline-emerald-400 | -unity-text-outline-color: #34D399; |
text-outline-emerald-500 | -unity-text-outline-color: #10B981; |
text-outline-emerald-600 | -unity-text-outline-color: #059669; |
text-outline-emerald-700 | -unity-text-outline-color: #047857; |
text-outline-emerald-800 | -unity-text-outline-color: #065F46; |
text-outline-emerald-900 | -unity-text-outline-color: #064E3B; |
text-outline-emerald-950 | -unity-text-outline-color: #022C22; |
text-outline-teal-50 | -unity-text-outline-color: #F0FDFA; |
text-outline-teal-100 | -unity-text-outline-color: #CCFBF1; |
text-outline-teal-200 | -unity-text-outline-color: #99F6E4; |
text-outline-teal-300 | -unity-text-outline-color: #5EEAD4; |
text-outline-teal-400 | -unity-text-outline-color: #2DD4BF; |
text-outline-teal-500 | -unity-text-outline-color: #14B8A6; |
text-outline-teal-600 | -unity-text-outline-color: #0D9488; |
text-outline-teal-700 | -unity-text-outline-color: #0F766E; |
text-outline-teal-800 | -unity-text-outline-color: #115E59; |
text-outline-teal-900 | -unity-text-outline-color: #134E4A; |
text-outline-teal-950 | -unity-text-outline-color: #042F2E; |
text-outline-cyan-50 | -unity-text-outline-color: #ECFEFF; |
text-outline-cyan-100 | -unity-text-outline-color: #CFFAFE; |
text-outline-cyan-200 | -unity-text-outline-color: #A5F3FC; |
text-outline-cyan-300 | -unity-text-outline-color: #67E8F9; |
text-outline-cyan-400 | -unity-text-outline-color: #22D3EE; |
text-outline-cyan-500 | -unity-text-outline-color: #06B6D4; |
text-outline-cyan-600 | -unity-text-outline-color: #0891B2; |
text-outline-cyan-700 | -unity-text-outline-color: #0E7490; |
text-outline-cyan-800 | -unity-text-outline-color: #155E75; |
text-outline-cyan-900 | -unity-text-outline-color: #164E63; |
text-outline-cyan-950 | -unity-text-outline-color: #083344; |
text-outline-sky-50 | -unity-text-outline-color: #F0F9FF; |
text-outline-sky-100 | -unity-text-outline-color: #E0F2FE; |
text-outline-sky-200 | -unity-text-outline-color: #BAE6FD; |
text-outline-sky-300 | -unity-text-outline-color: #7DD3FC; |
text-outline-sky-400 | -unity-text-outline-color: #38BDF8; |
text-outline-sky-500 | -unity-text-outline-color: #0EA5E9; |
text-outline-sky-600 | -unity-text-outline-color: #0284C7; |
text-outline-sky-700 | -unity-text-outline-color: #0369A1; |
text-outline-sky-800 | -unity-text-outline-color: #075985; |
text-outline-sky-900 | -unity-text-outline-color: #0C4A6E; |
text-outline-sky-950 | -unity-text-outline-color: #082F49; |
text-outline-blue-50 | -unity-text-outline-color: #EFF6FF; |
text-outline-blue-100 | -unity-text-outline-color: #DBEAFE; |
text-outline-blue-200 | -unity-text-outline-color: #BFDBFE; |
text-outline-blue-300 | -unity-text-outline-color: #93C5FD; |
text-outline-blue-400 | -unity-text-outline-color: #60A5FA; |
text-outline-blue-500 | -unity-text-outline-color: #3B82F6; |
text-outline-blue-600 | -unity-text-outline-color: #2563EB; |
text-outline-blue-700 | -unity-text-outline-color: #1D4ED8; |
text-outline-blue-800 | -unity-text-outline-color: #1E40AF; |
text-outline-blue-900 | -unity-text-outline-color: #1E3A8A; |
text-outline-blue-950 | -unity-text-outline-color: #172554; |
text-outline-indigo-50 | -unity-text-outline-color: #EEF2FF; |
text-outline-indigo-100 | -unity-text-outline-color: #E0E7FF; |
text-outline-indigo-200 | -unity-text-outline-color: #C7D2FE; |
text-outline-indigo-300 | -unity-text-outline-color: #A5B4FC; |
text-outline-indigo-400 | -unity-text-outline-color: #818CF8; |
text-outline-indigo-500 | -unity-text-outline-color: #6366F1; |
text-outline-indigo-600 | -unity-text-outline-color: #4F46E5; |
text-outline-indigo-700 | -unity-text-outline-color: #4338CA; |
text-outline-indigo-800 | -unity-text-outline-color: #3730A3; |
text-outline-indigo-900 | -unity-text-outline-color: #312E81; |
text-outline-indigo-950 | -unity-text-outline-color: #1E1B4B; |
text-outline-violet-50 | -unity-text-outline-color: #F5F3FF; |
text-outline-violet-100 | -unity-text-outline-color: #EDE9FE; |
text-outline-violet-200 | -unity-text-outline-color: #DDD6FE; |
text-outline-violet-300 | -unity-text-outline-color: #C4B5FD; |
text-outline-violet-400 | -unity-text-outline-color: #A78BFA; |
text-outline-violet-500 | -unity-text-outline-color: #8B5CF6; |
text-outline-violet-600 | -unity-text-outline-color: #7C3AED; |
text-outline-violet-700 | -unity-text-outline-color: #6D28D9; |
text-outline-violet-800 | -unity-text-outline-color: #5B21B6; |
text-outline-violet-900 | -unity-text-outline-color: #4C1D95; |
text-outline-violet-950 | -unity-text-outline-color: #2E1065; |
text-outline-purple-50 | -unity-text-outline-color: #FAF5FF; |
text-outline-purple-100 | -unity-text-outline-color: #F3E8FF; |
text-outline-purple-200 | -unity-text-outline-color: #E9D5FF; |
text-outline-purple-300 | -unity-text-outline-color: #D8B4FE; |
text-outline-purple-400 | -unity-text-outline-color: #C084FC; |
text-outline-purple-500 | -unity-text-outline-color: #A855F7; |
text-outline-purple-600 | -unity-text-outline-color: #9333EA; |
text-outline-purple-700 | -unity-text-outline-color: #7E22CE; |
text-outline-purple-800 | -unity-text-outline-color: #6B21A8; |
text-outline-purple-900 | -unity-text-outline-color: #581C87; |
text-outline-purple-950 | -unity-text-outline-color: #3B0764; |
text-outline-fuchsia-50 | -unity-text-outline-color: #FDF4FF; |
text-outline-fuchsia-100 | -unity-text-outline-color: #FAE8FF; |
text-outline-fuchsia-200 | -unity-text-outline-color: #F5D0FE; |
text-outline-fuchsia-300 | -unity-text-outline-color: #F0ABFC; |
text-outline-fuchsia-400 | -unity-text-outline-color: #E879F9; |
text-outline-fuchsia-500 | -unity-text-outline-color: #D946EF; |
text-outline-fuchsia-600 | -unity-text-outline-color: #C026D3; |
text-outline-fuchsia-700 | -unity-text-outline-color: #A21CAF; |
text-outline-fuchsia-800 | -unity-text-outline-color: #86198F; |
text-outline-fuchsia-900 | -unity-text-outline-color: #701A75; |
text-outline-fuchsia-950 | -unity-text-outline-color: #4A044E; |
text-outline-pink-50 | -unity-text-outline-color: #FDF2F8; |
text-outline-pink-100 | -unity-text-outline-color: #FCE7F3; |
text-outline-pink-200 | -unity-text-outline-color: #FBCFE8; |
text-outline-pink-300 | -unity-text-outline-color: #F9A8D4; |
text-outline-pink-400 | -unity-text-outline-color: #F472B6; |
text-outline-pink-500 | -unity-text-outline-color: #EC4899; |
text-outline-pink-600 | -unity-text-outline-color: #DB2777; |
text-outline-pink-700 | -unity-text-outline-color: #BE185D; |
text-outline-pink-800 | -unity-text-outline-color: #9D174D; |
text-outline-pink-900 | -unity-text-outline-color: #831843; |
text-outline-pink-950 | -unity-text-outline-color: #500724; |
text-outline-rose-50 | -unity-text-outline-color: #FFF1F2; |
text-outline-rose-100 | -unity-text-outline-color: #FFE4E6; |
text-outline-rose-200 | -unity-text-outline-color: #FECDD3; |
text-outline-rose-300 | -unity-text-outline-color: #FDA4AF; |
text-outline-rose-400 | -unity-text-outline-color: #FB7185; |
text-outline-rose-500 | -unity-text-outline-color: #F43F5E; |
text-outline-rose-600 | -unity-text-outline-color: #E11D48; |
text-outline-rose-700 | -unity-text-outline-color: #BE123C; |
text-outline-rose-800 | -unity-text-outline-color: #9F1239; |
text-outline-rose-900 | -unity-text-outline-color: #881337; |
text-outline-rose-950 | -unity-text-outline-color: #4C0519; |
Using Text Outline Colors
The utility includes a range of predefined colors for text outlines, derived from the Colors
palette in the Core
section of the Theme Config asset. You can utilize these predefined colors or customize them according to your project's theme.
Applying Text Outline Color
To apply a text outline color, use the text-outline-{color}
class where {color}
corresponds to the desired color key from the available options.
Basic Usage in UXML
Set the outline color of text to a specific color using the corresponding class:
<ui:Label class="text-outline-slate-500">This is a label with a slate outline.</ui:Label>
<ui:Label class="text-outline-red-500">This label has a red text outline.</ui:Label>
Customize
Modifier Variations
You can customize which modifier variations of the Text Outline Color
utility are generated, such as pseudo-classes (e.g., hover
, focus
) and custom modifiers.
Text Outline Color
utility by default:- hover
- focus
By fine-tuning the utility variations, you maintain control over your stylesheet's size and complexity, ensuring that only necessary styles are included. To update these values:
- Open the Theme Config Asset: Find the asset within your Unity project.
- Navigate to the 'Utilities' Section: Locate the
Text Outline Color
utility. - Adjust Modifier Variations: Select which modifiers you want to be generated for the utility. Keep in mind that the order of the modifiers will affect the order and specificity of the generated USS classes.
Class Tags and Properties
The Text Outline Color
utility generates classes based on predefined tags and their associated USS properties. While we recommend keeping these defaults for consistency and ease of reference in our documentation, you have the option to customize them to suit your project's specific needs.
These values are prepended to the defined values in this format tag-{value}
. If a tag is empty, the generated class will simply be the value by itself.
Here are the default tags and the USS properties they set for the Text Outline Color
utility:
- text-outline : -unity-text-outline-color
To customize these tags and properties, you can edit the Tag Property Map
field for the Text Outline Color
utility in the Theme Config asset. This allows you to define new tags or modify existing ones, thus tailoring the generated classes to your preferences.
Extending Core Fields
The Text Outline Color
utility uses values from the following fields from the Core
section of the Theme Config asset:
- Colors
To customize or define these extended fields:
- Open the Theme Config Asset: Locate the asset within your Unity project.
- Navigate to the 'Utilities' Section: Find the
Text Outline Color
utility. - Customize Extend Fields: Modify or add fields in the
Extend Fields
array to change the core configuration values that are extended. You'll only be able to extend fields of the same type.
Disable Utility
The Text Outline Color
utility is enabled by default. You can disable it by unchecking the Enabled
option in the Theme Config asset. This will prevent the generation of the utility's styles.