background:gradient(); CSS. Smooth transition from one color to another

Just recently I came across a photo of a stunning dress. You know, it attracted me with its unusual colors. The abundance of colors mixed with each other, reminiscent of an oil painting. Will such pretentiousness seem completely absurd and bad taste to you? But I dare to assure you - it’s wonderful! To better understand, I started looking for information on what this color ratio in clothes is called.

Dégrade or ombre is the name given to the effect of a smooth transition from one color to another.

What is ombre

This technique is a type of gradient. It implies a smooth transition from one shade to another. Another option is the flow of color from dark to light, or vice versa. Designers are attracted by the opportunity to apply coloring to any interior details.

The gradient does not have to be vertical. In the design of decor and interior items, sometimes there is a horizontal transition of shades. This coloring technique is more difficult to perform, but is popular in some modern styles.

Horizontal ombre

Vertical ombre

Advice! There shouldn't be too much ombre. If you decide to paint the walls using this technique, you should not decorate the floor and ceiling in the same way. The effect attracts attention when it is expressed organically.

Material Design

Values ​​in Material Design quickly change direction on the graph when the value reaches 500. Some colors may have accessibility issues because some base colors are brighter than colors at other positions in the palette. Of course, the problem could be solved by changing the text color when switching themes (for example, using black text color instead of white), but our goal is to find a solution that will always work well with one specific text color.

https://material.io/guidelines/style/color.html#color-color-palette

The right color combination for a stylish ombre

To create a gradient on the walls, you need to choose the right shades. It is important that the colors are “friendly” with each other - only then will they shade and complement each other.

For easier selection, you can use the color wheel. It is not necessary to take two adjacent shades - you can skip several tones. The gradient will be especially noticeable if you take the darkest and lightest shade from the same group. If you don't want such a clear transition, consider colors that are closest to each other.

Designers often play with contrasting shades. This combination looks impressive, but it is important not to make a mistake with the components of the ensemble. Before transferring the color to a wall or fabric, test the color scheme you like on paper.

Another interesting technique is to combine a white or cream shade with a bright one. This is a universal option for creating an ombre effect.

Advice! You can peek at combination ideas in completed design projects. Then you will be less likely to make mistakes.

Retrospective review

One of the very first things we thought about when creating a design system was creating a color palette, because it is so important in making design and development decisions. We are constantly learning - and often see obvious mistakes in retrospect. Our desire to grow led us to study how other teams make decisions - and only then make our own.

Controlling changes is not an easy job because color is such a big concept. We already know that even seemingly innocuous changes to colors can cause problems for teams that have already started making Mineral-based products. Therefore, the recent color revision shows our goal of eliminating breaking changes.

Taken from Plasma Design System. Basic elements like color are difficult to change later.

By analyzing color schemes during the revision, we determined that our color palette should contain the following characteristics:

  • Themes : These provide a consistent feel and look across all products, eliminating the need for guesswork.
  • Thematic Harmony : Each color theme should have one tone value.
  • Clear color breakpoints : Many of our products are sold in modules or sets, so the colors must be similar enough to be perceived as a color “family”, but at the same time make it clear enough to the user that there are different modules within one family.
  • Scalable and complementary : The color palette should have a systematic pattern that can be expanded as the needs of the design system grow.
  • No fundamental changes : As we evolved, we wanted our color system to work in any situation, so we decided against making any breaking changes to the designs currently used in Mineral.
  • Accessibility : Our goal is to feel confident that everyone has a positive experience using our product. Mineral maintains a medium level of color contrast (AA). The visual presentation of text should be carried out with a contrast ratio of 4.5:1 in each of the user interface components.

Interior ideas with a gradient

Almost every decorative detail can be decorated using the ombre technique. But designers typically move in five main directions.

Paint and tiles on the walls

Ombre wall painting is quickly becoming a favorite among design trends. This decor has two advantages: it perfectly masks uneven walls and distracts attention from unsuccessful interior elements.

Gradient tiles are an ideal solution for bathrooms and bathrooms. To fully realize the effect, professionals recommend covering all the walls in the room with ceramic products. Preferred shades for decoration: turquoise, pink, purple, golden, red.

Ombre wall painting

Ombre tiles

Wallpaper with ombre effect

If you are not sure that you can handle painting the walls, you can buy wallpaper with a similar effect. Manufacturers took care of novice designers and created a lot of color combination options. Such wallpaper is appropriate in the hallway, kitchen, living room, bedroom, nursery, office, bathroom. Products with a slightly rough matte surface look best on walls.

Wallpaper with a gradient can be carefully used even in a classic style. If you manage to select products in neutral colors with perfectly blurred boundaries, feel free to “invite” them into the interior.

Ombre wallpaper on the wall

Idea! It is not necessary to cover all the walls with wallpaper with a color transition effect. You can highlight one accent surface with them, and leave the rest monochromatic.

Home textiles

The most popular solution is tulle or ombre curtains. They look elegant and perfectly complement the monochrome design of the room. Gradient dyeing technology is most often implemented on light, flowy fabrics. The ombre effect transforms even the simplest curtain options. Lovers of textiles with prints can rejoice - the gradient technique is perfectly combined with floral or marine motifs.

Ombre curtains

The color gradient looks decent on sofa cushions, blankets, and bedspreads. Textile accessories will brighten up the monochromatic design of the room and become an unobtrusive accent. A striking example of such a product is a delicate blanket from Lorena Canals.

buybuy

Blanket Lorena Canals

Try laying an ombre carpet on the floor. Such a detail will visually add volume to the room and give the design a new meaning. To make the effect of the transition of shades more noticeable, choose small rugs.

Ombre carpet in the living room interior

Furniture and accessories

On sale you can find original furniture with an ombre effect. Manufacturers paint chests of drawers, cabinets, chairs, and tables in a similar way. Wooden products with a gradient design look impressive.

The furniture upholstery, decorated with soft color transitions, looks interesting. Such sofas, poufs and armchairs will ideally complement a living room, bedroom or children's room.

Using the gradient technique, you can upgrade an old plain chest of drawers. If you don't know how to properly create muted boundaries between different shades, use a simple trick. Paint each drawer a separate color, following the rule of adjacent tones. This coloring can hardly be called a full-fledged ombre, but it looks amazing.

Ombre chest of drawers

Decor elements

Gradient painting helps turn the most primitive decorative accessories into designer masterpieces. You can experiment with:

  • Panels, posters, paintings.
  • Vases, flowerpots for flower pots.
  • Wall panels.
  • Dishes.

Cute boxes, hanging rag organizers for cosmetics, and plastic figurines look great in the interior. They can also be decorated in accordance with fashionable color trends.

  • Pay attention to the exquisite vase from To4rooms and the pink Flamingo figurine

buybuy

Vase To4rooms

buybuy

IBM Design

The IBM color palette covers the entire spectrum of saturation and brightness, but it was difficult to define a single rule that would govern the different color transition schemes. Take Green (see below) - IBM has a widely shifted hue value between 78 and 120 - it can be difficult to consistently reproduce and manipulate such values ​​when working with other colors. IBM clearly values ​​accessibility, because they repeatedly set the contrast ratio to 4.5:1 or higher when the value is 50 or higher.

https://www.ibm.com/design/language/resources/color-library

How to create an ombre effect yourself

To create a fashionable color stretch, you don’t need to have any special technique. You will need a minimum of materials, a little time and creative inspiration.

How to paint a wall with a color transition

Before you start decorating the wall, prepare masking tape, paints of your favorite colors, rollers, and brushes. You can pre-mark the surface into sections. Then it will be easier to create an even transition line.

Let's move on to a step-by-step algorithm for painting ombre walls with your own hands. If you do everything right, the results will be amazing.

StepProcedure
Choosing the direction of shadesThe first step is to decide in which direction the shades will be placed. If you want to visually raise the ceiling, create a transition from dark to lighter tones.
Preparing the wallsPrepare the surface before painting. Carefully process the wall so that there are no uneven spots left on it. If necessary, a coat of primer can be applied. Use masking tape to protect baseboards and window openings from paint.
Preparing the PaintTo make your work easier, prepare your paints in advance. It is best to pour the compositions into separate trays or small buckets. Don't forget to create an intermediate tone by mixing the main shades in equal proportions.
PaintingIf you decide to start with a dark shade, cover the wall from the bottom up. If the color is light, it’s the other way around. Apply the mixed shade to the central part of the surface. To create a soft transition, blur the boundaries between sections with neat, sweeping strokes. Do this immediately after applying the composition to the wall, otherwise the paint will dry and it will be more difficult to achieve the effect.
Final touchesCarefully paint areas adjacent to the floor and ceiling skirting boards. Make sure that there are no untreated surfaces left on the wall. Remove the masking tape.

Important Tips:

  • To mix colors well, you will need a dry brush. It will be more convenient for you if you have several tools at hand that can be changed if necessary.
  • Painting will look better if you mix fresh paints. Move gradually, without making sudden transitions from one area to another.
  • When painting walls, choose dyes that take a long time to dry. The best solution is oil paints.
  • When applying paint, leave a gap of 10-15 cm between color areas. Then you will have more flexibility to create a beautiful transition.

You have learned only about one method of applying paint with a color transition. We invite you to familiarize yourself with several more simple and effective techniques for decorating walls.

Ombre on fabric

Painting textiles is even easier than painting walls. For work you will need: high-quality dye, containers for diluting compounds, clean water, fabric.

How to proceed:

  • Dilute the saturated coloring composition according to the manufacturer's instructions.
  • Take a clean bowl, pour a little ready-made coloring solution, dilute it with water in a ratio of 1:2.
  • Prepare another bowl, add the concentrated coloring solution again, dilute with water in a ratio of 1:4.
  • Take a cloth and dip one edge of it in the lightest solution. Keep the material in the liquid for 10-15 minutes.
  • Turn the fabric over and dip it in medium-intensity dye up to the border where the light tone begins. Leave for 15 minutes.
  • Dip the bottom edge of the material into the brightest dye solution.

After dyeing, rinse the textiles in cool water. This will help remove excess paint and even out the color. There is no need to add washing powder to the rinse liquid.

Advice! If you are going to wash the fabric before applying the dye, do not use softening conditioners. The chemicals contained in them can negatively affect the results.

Open Color

Open Color palettes are built on refined curves. Look at the color placement on the HSB grid: it looks like this curve was deliberately designed to be so neat. The correct choice of colors reflects modern web design trends. The contrast ratio is slightly lower, so these palettes won't exactly help us make the company's products available by default.

https://yeun.github.io/open-color/

Animation steps

In addition to the slowdown functions, an element can be animated using steps, i.e. stepwise. (An example would be the second hand of a clock, which first moves, then delays for 1 second, then moves again and delays again, etc.) Steps are specified using the steps() . Below is an example:

transition: all 2000ms steps(3, end);

Now the button magnification animation will be jerky.
The delay between jerks in this case will be 667ms (2000/3). The second parameter to the steps function specifies whether the dash will occur immediately or after a delay: Steps Function Values

FunctionScheduleDescription
steps(3)A pause occurs when the animation starts. (This function matches steps(3, end) because end is the default.)
steps(3, end)A pause occurs when the animation starts.
steps(3, start)The animation starts immediately, with a pause at the end.

Analysis

  • With IBM, you can use color without worrying about accessibility because each color transition pattern can be applied consistently to a variety of products. They did a good job of consistently distinguishing the proportions of color contrast for each value (more on this later).
  • Material design has a large selection of color schemes, but overall there is inconsistency in the palette.
  • Open Color has the most identifiable pattern, and the palette has been designed to be easily scaled as other colors are added.
  • Interestingly, most color palettes use tonal shift to define color values ​​in the color transition chart - especially IBM's.

Proper care

Despite the fact that the gradient is a gentle painting method, it still requires lightening . Therefore, hair requires appropriate care:

  • wash your hair with shampoo from the “For colored hair” line;
  • use a hair dryer, straightener, curling iron as little as possible;
  • do not abuse styling products, they can negatively affect the resulting shade;
  • do not comb wet hair;
  • Use a mask for weakened or colored hair 2-3 times a week;
  • once a month you need to trim the ends.

Using Ease Features

The transition can be more finely tuned. To do this, you can use the transition-timing-function , which allows you to change the speed of the transition as it occurs. For example, the beginning of a transition may be slow and then accelerated, or vice versa, a fast transition at the beginning and slow at the end. For short transitions this property does not play a big role. But in longer and more complex animations, it can change the overall perception of the effect.

Ease functions are not some kind of innovative CSS3 feature, they have been used in WPF and Silverlight for a long time (Motion Inertia).

The transition-timing-function property uses the cubic-bezier() to specify the easing function via a Bezier curve. A Bezier curve is defined by two points: a start offset and an end offset. To understand this, let's look at an example of defining a simple Bezier curve:

transition-timing-function: cubic-bezier(0.42, 0, 0.58, 1);

The following graph corresponds to this function:

As you can see here, two points with coordinates (0.42, 0) and (0.58, 1) define the appearance of the Bezier curve. If you specify this slowdown function in the previous example, then all transition effects will be performed a little slower at first, then the speed will be faster and at the end of the transition the speed will decrease again (according to the schedule).

Understanding the logic behind Bezier curves allows you to create a virtually endless variety of custom softening functions for CSS3 animations. It's even possible to specify negative values ​​or values ​​greater than 1 to create extremely curved softenings, like this:

transition: all 2000ms cubic-bezier(0.280, -0.315, 0.685, 1.390);

Try this effect using a button as an example, I guarantee you will like the result.

The transition-timing-function property can use several standard values ​​that define some of the values ​​of the cubic-bezier function:
Standard Bezier curve function values ​​used in the transition-timing-function property

MeaningSchedulecubic-bezier() functionDescription
linear0, 0, 1, 1Immediate start and stop, animation occurs at a constant speed
easy0.25, 0.1, 0.25, 1Fast start and fast acceleration, slow transition with deceleration at the end
ease-in0.42, 0, 1, 1Slow start with increasing acceleration and abrupt stop at the end
ease-out0, 0, 0.58, 1Normal start with slowdown at the end
ease-in-out0.42, 0, 0.58, 1Slow start with slight acceleration, transition speed is constant, deceleration occurs at the end
Rating
( 2 ratings, average 5 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]