# Color URL: /foundations/feedback/color Source: https://github.com/daangn/seed-design/blob/dev/docs/content/foundations/feedback/color.mdx Clickable elements change their surface color while pressed. Crispy defines the pressed state color as a pressed token within the role-based color system. Color is the most basic way to signal a press. By simply changing the surface color, users can immediately know where they pressed and whether their input reached the element. ![Comparison of button in default and pressed states — the pressed one has a darker surface color revealing where it was pressed]() Color fulfills this role because it works in any environment. Scale doesn't work with OS motion reduction settings, and Haptic isn't delivered depending on the device, but color transitions aren't affected by settings. That's why Crispy applies color to all pressable elements and adds other feedback elements on top. ## Pressed color is defined as a token ![Comparison of button in default and pressed states — surface color changes from bg.brand-solid to bg.brand-solid-pressed while label color remains the same]() Crispy defines the pressed state color as a token. Within the [role-based color](/foundations/color/color-role) system, tokens with `-pressed` are placed, and each component specifies which token to use when pressed. [Action Button](/components/action-button)'s brandSolid uses `$color.bg.brand-solid` in the default state and `$color.bg.brand-solid-pressed` when pressed. ## Color changes only on the surface ![Do — When a menu item is pressed, only the surface color darkens while text and icon colors remain unchanged]() ![Don't — When a menu item is pressed, text and icon colors also dim together]() Color transition occurs on the element's **surface**. For elements with a surface, the colors of text and icons placed on top don't respond to the press. If both surface and text color change, it reads as if the entire element has been replaced with a different element. We don't provide pressed tokens for foreground. ## When applying to custom-built elements When defining pressed color for components not provided by Crispy, check three things in order. ### 1. Find the pressed token corresponding to the base color Don't create a new pressed color; choose from already-defined tokens. The token with `-pressed` appended to the base token name is its pair. If the background is `$color.bg.neutral-weak`, use `$color.bg.neutral-weak-pressed` when pressed. ### 2. When the default state has no background color ![Comparison of ghost button in default and pressed states — normally has no background token, but bg.transparent-pressed surface appears when pressed]() Elements without background color in the default state also gain a surface when pressed. In Crispy, [Action Button](/components/action-button)'s ghost button falls into this category. Normally only text is visible, but a background appears when pressed, revealing the pressed area. Use `$color.bg.transparent-pressed` for the surface color. Since it's an alpha value, it blends with any background color beneath it. However, for components placed on floating layers like FAB or Action Sheet, use `$color.bg.layer-floating-pressed`. Corner radius is not provided as a common value; each component defines it directly. ### 3. Check if color should not be used ![Pressing a Switch — only scale reduction occurs while colors indicating on/off remain unchanged]() ![Pressing an individual tab — only scale reduction occurs while color indicating selection changes after release]() If color already represents the element's state, don't use color for press feedback. [Switch](/components/switch) uses color to distinguish on/off, and [individual tabs](/components/tabs) distinguish selected/unselected. If color changes while pressing these elements, the state appears to change before releasing the finger. So keep the color unchanged and convey the press using [scale](/foundations/feedback/scale) alone. ## Pressed Tokens | Token | theme-light | theme-dark | | --- | --- | --- | | $color.bg.brand-solid-pressed | $color.palette.carrot-700 | $color.palette.carrot-800 | | $color.bg.brand-weak-pressed | $color.palette.carrot-200 | $color.palette.carrot-200 | | $color.bg.critical-solid-pressed | $color.palette.red-800 | $color.palette.red-700 | | $color.bg.critical-weak-pressed | $color.palette.red-200 | $color.palette.red-200 | | $color.bg.informative-solid-pressed | $color.palette.blue-800 | $color.palette.blue-700 | | $color.bg.informative-weak-pressed | $color.palette.blue-200 | $color.palette.blue-200 | | $color.bg.layer-default-pressed | $color.palette.gray-100 | $color.palette.gray-300 | | $color.bg.layer-floating-pressed | $color.palette.gray-100 | $color.palette.gray-300 | | $color.bg.neutral-inverted-pressed | $color.palette.gray-800 | $color.palette.gray-800 | | $color.bg.neutral-weak-alpha-pressed | $color.palette.static-black-alpha-300 | $color.palette.static-white-alpha-300 | | $color.bg.neutral-weak-pressed | $color.palette.gray-300 | $color.palette.gray-400 | | $color.bg.positive-solid-pressed | $color.palette.green-800 | $color.palette.green-600 | | $color.bg.positive-weak-pressed | $color.palette.green-200 | $color.palette.green-200 | | $color.bg.transparent-pressed | $color.palette.static-black-alpha-100 | $color.palette.static-white-alpha-50 | | $color.bg.transparent-selected-pressed | $color.palette.static-black-alpha-300 | $color.palette.static-white-alpha-200 | | $color.bg.warning-solid-pressed | $color.palette.yellow-400 | $color.palette.yellow-900 | | $color.bg.warning-weak-pressed | $color.palette.yellow-200 | $color.palette.yellow-200 |