To provide services at the highest level, we use cookies as described in our cookie policy. By using our website, cookies will be placed on your device. You can change your browser settings at any time. Check our cookie policy.
Authors
- Izabela Łaszczuk
Authors
- Izabela Łaszczuk
Content
Categories
Welcome
to our series “Design Decoded”. We are going to share with you our thoughts on the topic of delivering design mockups (by that I mean the drawings that designers create to illustrate how the application should look, for example, the image below.) to developers. Whether you're a developer seeking better ways to communicate your needs to the design team for more effective collaboration or you find yourself frustrated by the repetitive task of explaining crucial details missing from mockups. Perhaps you're a designer struggling with inconsistent information from various developer teams, leaving you without a single source of truth. Either way, I think you can find this series helpful. This is an extremely important part of our everyday work-life and the purpose of this series is to make everybody's lives easier.
If you think about color palettes you may come to the conclusion that it is the least important thing that developers should care about. They can change it anytime, so what’s the difference if they get a full color palette before they start coding or later, for example when the app is already working? Well… That kind of conclusion makes a lot of developers cry at night.
I can partially agree. Yes, we can change colors on the app anytime, but only if they were made properly. But let’s start from the beginning.
If you think about color palettes you may come to the conclusion that it is the least important thing that developers should care about. They can change it anytime, so what’s the difference if they get a full color palette before they start coding or later, for example when the app is already working? Well… That kind of conclusion makes a lot of developers cry at night.
I can partially agree. Yes, we can change colors on the app anytime, but only if they were made properly. But let’s start from the beginning.
![The site's dashboard, which is divided into several sections: The header section contains the CAR.NOW company logo, a user greeting and a logout button. The main section contains information about the company's income and expenses. It is divided into two columns: The revenue column displays information about the company's revenue by drivers and bookings. The expense column displays information about the company's expenses by last week and category (e.g. rent, fuel, repairs). The reports section provides links to detailed reports such as the payment report, transaction report and car availability report. The notifications section displays information about new notifications, such as new bookings or cancellations. In the settings section, users can change their personal information and preferences.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F1%20color%20-%20no%20palette.png&w=3840&q=75)
And what does he get when he asks for a color palette?
![Color palette with samples and hex codes. The picture shows a row of squares in different colors. The background color is white. Under each square is the hex code corresponding to its color. Primary colors: #9D7AFF (purple), #AC8FFF (blue), #C5B0FF (pink). Additional colors: #D5D5D5 (light gray), #D9D9D9 (lighter gray), #D4D4D4 (gray), #E4E4E4 (darker gray), #EFEFEF (darkest gray) Other colors: #f8fafc (white), #FF9898 (red), #C27676 (brown), #E77070 (orange), #73EEDF (light blue), #5DC1B5 (green), #399F93 (dark green), #DDDF74 (yellow), #D0D177 (gold), #9A9B57 (beige), #000000 (black)](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F2%20color%20-%20palette%20bad.png&w=3840&q=75)
Most often, something like this…
At first glance, everything seems to be fine. After all, we have a color palette provided. So what's the problem?
If you take a closer look for a moment, you will surely notice a few issues.
First and foremost, there are colors on it that are almost identical, there is no consistent naming, there is a lack of color specifications for different states (active, hover, disabled, etc.), and text colors are not marked.
In such a situation, a developer, in order not to create chaos in the code, should immediately go back to the design team with questions. They shouldn’t start work if there is no appropriate color palette because it carries consequences, which we will discuss shortly with examples.
Proper preparation of color configurations and thorough verification can significantly facilitate the creation process in later stages. It is worth taking the time to carefully perform these steps to avoid wasting time later on.
![Color palette with shades of gray, purple and red. The picture shows a color palette with 30 different shades of gray, purple and red. Each shade has a name and a number. The HEX codes for each shade are also given. Gray: Slate 50: #F8FAFC, Slate 100: #E2E8F0, Slate 200: #CBD5E1, Slate 300: #94A388, Slate 400: #647488, Slate 500: #475569, Slate 600: #334155, Slate 700: #1E293B, Slate 800: #0F172A, Slate 900: #000000 Violet: Violet 50: #F5F3FF, Violet 100: #EDE9FE, Violet 200: #DDD6FE, Violet 300: #C4B5FD, Violet 400: #A78BFA, Violet 500: #8B5CF6, Violet 600: #7C3AED, Violet 700: #6D28D9, Violet 800: #582186, Violet 900: #4C1D95 Red: Red 50: #FEF2F2, Red 100: #FEE2E2, Red 200: #FECACA, Red 300: #FCA5A5, Red 400: #F87171, Red 500: #EF4444, Red 600: #DC2626, Red 700: #B91C1C, Red 800: #991818, Red 900: #7F1D1D](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F3%20color%20-%20palette%20good.png&w=3840&q=75)
This is how the default color palette looks like in Tailwind. It illustrates the principle according to which designers should provide colors.
The main shade of a given color is the value 500, for example: slate-500, red-500, etc. Anything lighter takes values below 500, and anything darker takes values above 500.
I will use Tailwind as an example, because it works best for us and we have the most experience with it (click here). If you typically use another framework such as Bootstrap, MaterialUI, Bulma, don't worry, you can easily adopt all the principles we provide to suit your needs.
We realize that creating a color palette is not always necessary because there are projects where we use only 3-4 colors. In such cases, a palette is redundant. If so, it is sufficient to provide developers these colors with appropriate names. Use the same name in Figma (or similar design tool, I will just use it as an example) as well as in the code, leaving no doubts about whether it's the same hex code.
In an ideal world, the designer takes the entire Tailwind color palette, selects the colors they want to use, retains their assigned names, and only changes the hex values to those needed for the specific project.
By using these formats in Figma, the developer knows precisely which color to use in the code. Everything is clear and transparent. Such a solution ensures a single source of truth. This streamlines the project creation process and code implementation, ensuring visual consistency and work efficiency.
This can result in situations such as having both "gray" and "grey" representing different colors or names like "lightVioletOrangePurple" or "twilightSparkle" (sic!), which do not provide clear information about the color, where it should be used, if changing it will have any consequences, etc.
This leads to chaos, duplicates* of hex values with different names, and a multitude of almost identical colors.
Take a look yourself, this is a real life example of what code looks like when nobody cares.
![A screenshot of source code written in JavaScript. The code defines a color palette for the user interface, including color names and hex values. The colors are disorganized, with several repetitions or nearly identical shades. The color naming is incorrect, making it difficult to determine the actual color based solely on the name.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F4%20color%20-%20%20%20bad%20example.png&w=3840&q=75)
*Duplication is generally undesirable, BUT(!) there are situations in which using the same hex value and giving it a new name is entirely justified and even recommended. For example, if you've added a color named "promotion" to the palette, knowing that it will change later, and there's a place in the application where you need the same color but don't want it to change later (e.g., for a warning message), in that case, you should add a color to the palette with a name "warning" and use the same hex value as for "promotion."
By doing this, you eliminate future issues, such as manually checking the entire application to ensure that you didn't inadvertently change the color in places where it wasn't supposed to change when modifying a campaign.
Another example shows what happens when the design has been using a color palette from the beginning of the project. Developers created names following the Tailwind concept. The same names are used in Figma.
![A screenshot of the navigation desktop view of the CAR.NOW website in the Figma program. In addition to the webpage on the right side, there is a panel where colors are adjusted. In the 'color selection' section, three colors are visible that are used on the website, named 'green-400,' 'orange-500,' and 'purple-500'.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F9%20colors-%20%20colors%20primary.png&w=3840&q=75)
Everything is clear and easily editable. Look at the difference in code:
![The CSS code defining the color palette for the user interface. The palette includes various shades of gray and orange written in the Tailwind convention (grey: 0:"#F6F6F8", 50:"#F1F0F5", 100:"#D7D7DC", etc. up to 900). Additionally, it presents the basic colors: white, black, and colors labeled with names success - green, warning - yellow, and error - red.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F6%20color%20-%20code%20color%20good%20tailwind.png&w=3840&q=75)
That should be the end of this article, but unfortunately life is not so easy and even creating a color palette this way can cause problems in some cases…
By using these formats in Figma, the developer knows precisely which color to use in the code. Everything is clear and transparent. Such a solution ensures a single source of truth. This streamlines the project creation process and code implementation, ensuring visual consistency and work efficiency.
Ok, but why?
If the design does not use a color palette from the beginning of the project and during its development, new, almost identical colors are added to Figma during its development without being assigned to any variables or organized into families/groups (e.g., gray, blue, etc.). Developers may add them to the project by inventing their own names. Over time, these names may (and most probably will) become less descriptive.This can result in situations such as having both "gray" and "grey" representing different colors or names like "lightVioletOrangePurple" or "twilightSparkle" (sic!), which do not provide clear information about the color, where it should be used, if changing it will have any consequences, etc.
This leads to chaos, duplicates* of hex values with different names, and a multitude of almost identical colors.
Take a look yourself, this is a real life example of what code looks like when nobody cares.
![A screenshot of source code written in JavaScript. The code defines a color palette for the user interface, including color names and hex values. The colors are disorganized, with several repetitions or nearly identical shades. The color naming is incorrect, making it difficult to determine the actual color based solely on the name.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F4%20color%20-%20%20%20bad%20example.png&w=3840&q=75)
*Duplication is generally undesirable, BUT(!) there are situations in which using the same hex value and giving it a new name is entirely justified and even recommended. For example, if you've added a color named "promotion" to the palette, knowing that it will change later, and there's a place in the application where you need the same color but don't want it to change later (e.g., for a warning message), in that case, you should add a color to the palette with a name "warning" and use the same hex value as for "promotion."
By doing this, you eliminate future issues, such as manually checking the entire application to ensure that you didn't inadvertently change the color in places where it wasn't supposed to change when modifying a campaign.
Another example shows what happens when the design has been using a color palette from the beginning of the project. Developers created names following the Tailwind concept. The same names are used in Figma.
![A screenshot of the navigation desktop view of the CAR.NOW website in the Figma program. In addition to the webpage on the right side, there is a panel where colors are adjusted. In the 'color selection' section, three colors are visible that are used on the website, named 'green-400,' 'orange-500,' and 'purple-500'.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F9%20colors-%20%20colors%20primary.png&w=3840&q=75)
Everything is clear and easily editable. Look at the difference in code:
![The CSS code defining the color palette for the user interface. The palette includes various shades of gray and orange written in the Tailwind convention (grey: 0:"#F6F6F8", 50:"#F1F0F5", 100:"#D7D7DC", etc. up to 900). Additionally, it presents the basic colors: white, black, and colors labeled with names success - green, warning - yellow, and error - red.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F6%20color%20-%20code%20color%20good%20tailwind.png&w=3840&q=75)
That should be the end of this article, but unfortunately life is not so easy and even creating a color palette this way can cause problems in some cases…
Let's imagine that the primary color in your project is the shade pink-500, which you use to style many elements. However, the project is long-term, and after some time, the client changes their mind, deciding that the main color should now be blue-500.
That shouldn’t be a problem, you created a color palette and prepared yourself for this, right? Right?
![A screenshot of the 'Webstorm' program displaying 86 search results for the phrase 'pink.' This name was found 86 times in 24 files. The window background is black, and the text is orange.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F7%20color%20pink%20search.png&w=3840&q=75)
WRONG. There could be hundreds of places where you would need to change such a color. It's not difficult, but it can take a significant amount of time, which you certainly don't want to waste. Additionally, the color pink may be used in non-primary areas, for example, as a decorator, and you might want to preserve it. In such a case, changing the color requires manually navigating through the entire application and checking each place individually.
You shouldn't use such naming conventions in areas susceptible to future changes. For instance, a promotional banner during different campaigns may require other colors.
But don’t worry, there is a better solution for this kind of situation!
For long-term projects or promotional banners, the best solution is to name colors as "primary," "secondary," "promotion," etc. Disclaimer - this doesn’t only apply to long-term projects. To be honest, sometimes clients can change their mind even during a short and small project, so you need to decide which method to choose. Maybe combine both? Primary & secondary for colors that have the biggest risk of changing and gray, yellow etc. for the colors that have a small risk.
![The CSS code defining the color palette for the user interface. The palette includes various shades of gray and orange written in the Tailwind convention, with modified names - instead of 'grey,' we see 'primary,' and instead of 'orange,' we see 'secondary' (primary: 0:"#F6F6F8", 50:"#F1F0F5", 100:"#D7D7DC", etc. up to 900). Additionally, it presents the basic colors: white, black, and colors labeled with names success - green, warning - yellow, and error - red.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F8%20colors%20-%20code%20color%20good%20function.png&w=3840&q=75)
![A screenshot of the navigation desktop view of the CAR.NOW website in the Figma program. In addition to the webpage on the right side, there is a panel where colors are adjusted. In the 'color selection' section, three colors are visible that are used on the website, named 'green-400,' 'orange-500,' and 'purple-500'.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F9%20colors-%20%20colors%20primary.png&w=3840&q=75)
This way, there won't be a need to go through the entire project, component by component, changing bg-orange-200 to bg-blue-200. All you need to do is replace the hex codes of the primary color in one place, where it has been declared.
By using abstract names (don’t get too crazy here. Primary-second, secondary-main, secondary-double are not good names), you can easily change the color palette of the project without altering the HTML or CSS code itself. You can update the colors assigned to abstract names to adapt the project to evolving requirements.
If the project dynamically changes colors based on data such as rankings, status, or results, using abstract color names can simplify mapping this data to appropriate styles.
![A screenshot of the 'Webstorm' program displaying 86 search results for the phrase 'pink.' This name was found 86 times in 24 files. The window background is black, and the text is orange.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F7%20color%20pink%20search.png&w=3840&q=75)
WRONG. There could be hundreds of places where you would need to change such a color. It's not difficult, but it can take a significant amount of time, which you certainly don't want to waste. Additionally, the color pink may be used in non-primary areas, for example, as a decorator, and you might want to preserve it. In such a case, changing the color requires manually navigating through the entire application and checking each place individually.
You shouldn't use such naming conventions in areas susceptible to future changes. For instance, a promotional banner during different campaigns may require other colors.
But don’t worry, there is a better solution for this kind of situation!
For long-term projects or promotional banners, the best solution is to name colors as "primary," "secondary," "promotion," etc. Disclaimer - this doesn’t only apply to long-term projects. To be honest, sometimes clients can change their mind even during a short and small project, so you need to decide which method to choose. Maybe combine both? Primary & secondary for colors that have the biggest risk of changing and gray, yellow etc. for the colors that have a small risk.
![The CSS code defining the color palette for the user interface. The palette includes various shades of gray and orange written in the Tailwind convention, with modified names - instead of 'grey,' we see 'primary,' and instead of 'orange,' we see 'secondary' (primary: 0:"#F6F6F8", 50:"#F1F0F5", 100:"#D7D7DC", etc. up to 900). Additionally, it presents the basic colors: white, black, and colors labeled with names success - green, warning - yellow, and error - red.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F8%20colors%20-%20code%20color%20good%20function.png&w=3840&q=75)
![A screenshot of the navigation desktop view of the CAR.NOW website in the Figma program. In addition to the webpage on the right side, there is a panel where colors are adjusted. In the 'color selection' section, three colors are visible that are used on the website, named 'green-400,' 'orange-500,' and 'purple-500'.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F9%20colors-%20%20colors%20primary.png&w=3840&q=75)
This way, there won't be a need to go through the entire project, component by component, changing bg-orange-200 to bg-blue-200. All you need to do is replace the hex codes of the primary color in one place, where it has been declared.
By using abstract names (don’t get too crazy here. Primary-second, secondary-main, secondary-double are not good names), you can easily change the color palette of the project without altering the HTML or CSS code itself. You can update the colors assigned to abstract names to adapt the project to evolving requirements.
In what other cases should we apply this principle?
When creating a white label solution, a project meant to serve multiple brands. Each new client may want their own color scheme. If abstract names are used, it becomes easier to customize colors for different visual identities without the need to change code in multiple places.If the project dynamically changes colors based on data such as rankings, status, or results, using abstract color names can simplify mapping this data to appropriate styles.
Gradients should be handled similarly to colors. Designers should assign gradient values to a variable, creating a gradient palette that developers manage in a manner analogous to colors.This saves time that would otherwise be spent rewriting these values each time, instead of using variables. Providing variables positively impacts the order and readability of the code.
Why?
![CSS code snippet. The code contains examples of using linear gradients, including angular and radial gradients to define background colors for HTML elements.Gradients are defined using the linear-gradient() function, which accepts parameters specifying the direction of the gradient, the colors and their position. The gradients are practically identical.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F10%20colors%20-%20code%20gradients%20bad.png&w=3840&q=75)
Here is how the code looks when the design doesn't use a gradient palette.
How did it happen?
The design didn't provide gradients at the beginning of the project. It might not have been as much of a problem if, when providing them later, the designer assigned them to variables. Developers would then immediately create a config file and give them appropriate names.
Unfortunately, each gradient in the project was provided in this way:
![A screenshot from the Figma program. We see a tab with a linear gradient. The gradient transitions from the color #DB4E66 to #A24688 to #4E3ABA. The gradient is unnamed.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F11%20colors%20-%20gradient%20bad.png&w=3840&q=75)
Developers started using gradients as independent elements. The result was the emergence of duplicates and nearly identical gradients, making them difficult to maintain. The code became chaotic, disorganized, and less readable, negatively impacting the entire design process.
It's essential to remember the consequences of inconsistency in the naming and organization of gradients. Maintaining orderly code and effectively managing design resources can significantly expedite the process of creating and maintaining a project in the future.
What should it look like?
![A screenshot from the Figma program. We see a tab with a linear gradient. The gradient transitions from the color #DB4E66 to #A24688 to #4E3ABA. The gradient is named 'poster-gradient'.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F12%20colors%20-%20gradient%20good.png&w=3840&q=75)
From the beginning, the design team ensures that gradients intended for use in the project are assigned to variables, creating a gradient palette.
![secondary-gradient, button-gradient, and text-gradient. Each gradient is defined using four values: angle, starting color, middle color, and ending color. The gradients differ from each other in colors.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F13%20colors%20-%20code%20gradients%20good.png&w=3840&q=75)
Developers add them as organized variables to the project. Everyone uses the same names (both in the code and Figma).This makes the code clear and very easy to edit.
![The source code is written in JavaScript. The code contains four elements, each of them has a class with a gradient. The gradients are named primary-gradient, secondary-gradient, text-gradient, and button-gradient.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F14%20colors%20-%20code%20gradient%20classes.png&w=3840&q=75)
Why?
![CSS code snippet. The code contains examples of using linear gradients, including angular and radial gradients to define background colors for HTML elements.Gradients are defined using the linear-gradient() function, which accepts parameters specifying the direction of the gradient, the colors and their position. The gradients are practically identical.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F10%20colors%20-%20code%20gradients%20bad.png&w=3840&q=75)
Here is how the code looks when the design doesn't use a gradient palette.
How did it happen?
The design didn't provide gradients at the beginning of the project. It might not have been as much of a problem if, when providing them later, the designer assigned them to variables. Developers would then immediately create a config file and give them appropriate names.
Unfortunately, each gradient in the project was provided in this way:
![A screenshot from the Figma program. We see a tab with a linear gradient. The gradient transitions from the color #DB4E66 to #A24688 to #4E3ABA. The gradient is unnamed.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F11%20colors%20-%20gradient%20bad.png&w=3840&q=75)
Developers started using gradients as independent elements. The result was the emergence of duplicates and nearly identical gradients, making them difficult to maintain. The code became chaotic, disorganized, and less readable, negatively impacting the entire design process.
It's essential to remember the consequences of inconsistency in the naming and organization of gradients. Maintaining orderly code and effectively managing design resources can significantly expedite the process of creating and maintaining a project in the future.
What should it look like?
![A screenshot from the Figma program. We see a tab with a linear gradient. The gradient transitions from the color #DB4E66 to #A24688 to #4E3ABA. The gradient is named 'poster-gradient'.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F12%20colors%20-%20gradient%20good.png&w=3840&q=75)
From the beginning, the design team ensures that gradients intended for use in the project are assigned to variables, creating a gradient palette.
![secondary-gradient, button-gradient, and text-gradient. Each gradient is defined using four values: angle, starting color, middle color, and ending color. The gradients differ from each other in colors.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F13%20colors%20-%20code%20gradients%20good.png&w=3840&q=75)
Developers add them as organized variables to the project. Everyone uses the same names (both in the code and Figma).This makes the code clear and very easy to edit.
![The source code is written in JavaScript. The code contains four elements, each of them has a class with a gradient. The gradients are named primary-gradient, secondary-gradient, text-gradient, and button-gradient.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F14%20colors%20-%20code%20gradient%20classes.png&w=3840&q=75)
Setting text colors is a crucial step in the design process. It often happens that the text color is created by adding opacity to white or black (which is a bad practice, you can read more about it here). Typically, we need two main text colors that are suitable for light and dark backgrounds to ensure proper readability and aesthetics. These colors should come from a previously prepared color palette.
![The image depicts a rectangle divided into two equal parts. The left side is black, and the right side is white. On the black side, there is a white square and the text "#efefef". On the white side, there is a black square and the text "#aa1a".](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F15%20colors%20-%20text%20two%20bg.png&w=3840&q=75)
![The image depicts a rectangle divided into two equal parts. The left side is black, and the right side is white. On the black side, there is a white square and the text "#efefef". On the white side, there is a black square and the text "#aa1a".](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F15%20colors%20-%20text%20two%20bg.png&w=3840&q=75)
*same applies to error, warning, success, active, hover, visited, targeted, disabled
Similar to font colors, it often happens that mockups do not account for the color that outlines should adopt during the focus state (a state in which a particular element is active or selected) of elements when navigating through them using the keyboard. This primarily concerns interactive elements such as buttons, links, and all form elements (inputs, selects, etc.). To adhere to good design practices, it is advisable to consider using an existing color in the context of the outline. Another crucial aspect is ensuring an appropriate contrast for the outline against the background.
Pay attention to various types of buttons. Should the "button error" and "button primary" have the same outline color during focus?
The best way to present it? Take a look at this example:
![A screenshot from Figma presenting various input field states in a form. The states include default, hover, active, focused, success, error, and disabled. Each of these states looks different, with changes in background, added border, transparency, or border color.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F16%20colors%20-%20states.png&w=3840&q=75)
Similar to font colors, it often happens that mockups do not account for the color that outlines should adopt during the focus state (a state in which a particular element is active or selected) of elements when navigating through them using the keyboard. This primarily concerns interactive elements such as buttons, links, and all form elements (inputs, selects, etc.). To adhere to good design practices, it is advisable to consider using an existing color in the context of the outline. Another crucial aspect is ensuring an appropriate contrast for the outline against the background.
Pay attention to various types of buttons. Should the "button error" and "button primary" have the same outline color during focus?
The best way to present it? Take a look at this example:
![A screenshot from Figma presenting various input field states in a form. The states include default, hover, active, focused, success, error, and disabled. Each of these states looks different, with changes in background, added border, transparency, or border color.](/_next/image?url=https%3A%2F%2Fsilk-page-uploads.s3.eu-north-1.amazonaws.com%2Fimages%2F16%20colors%20-%20states.png&w=3840&q=75)
The importance of providing developers with well-structured and comprehensive color palettes cannot be overstated. It goes beyond mere aesthetics; it directly impacts the efficiency, consistency, and maintainability of a project. The process of creating a color palette involves careful consideration and collaboration between designers and developers to ensure a seamless transition from design to code.
Ultimately, the collaborative effort between designers and developers in establishing and maintaining a thoughtfully crafted color palette is pivotal for a project's success. It not only enhances the visual coherence of the application but also contributes significantly to the overall efficiency and ease of future development and maintenance. As the design and development worlds continue to evolve, embracing these principles ensures a smoother, more harmonious workflow for both parties involved.
Happy coding/ happy designing!
Ultimately, the collaborative effort between designers and developers in establishing and maintaining a thoughtfully crafted color palette is pivotal for a project's success. It not only enhances the visual coherence of the application but also contributes significantly to the overall efficiency and ease of future development and maintenance. As the design and development worlds continue to evolve, embracing these principles ensures a smoother, more harmonious workflow for both parties involved.
Happy coding/ happy designing!