Converting Colors

Conversions

FormatColor
HSL0°, 17%, 21%
CIELCh21, 9.401, 21.441
Yxy3.1562, 0.3678, 0.3292
Android (android.graphics.Color)4282395949 (0xFF402D2D)
YUV50.6810, -2.8007, 11.6808

Get Conversions and Harmonies as JSON or XML.


Details

The Hex color 402D2D is a dark color, and the websafe version is hex 333333. A complement of this color would be 2D4040, and the grayscale version is 333333.

A 20% lighter version of the original color is 705B5B, and 160000 is the 20% darker color. If you saturate the color by 10%, you get 402727, and if you desaturate by 10%, it is 403333.

Distribution

25%18%18%Red, Green, Blue25%18%18%Red, Yellow, Blue0%30%30%75%Cyan, Magenta, Yellow and Black75%82%82%Cyan, Magenta, Yellow

Brightness Gradient

These gradients show how the Hex color 402D2D changes by changing the brightness by 10 percent. The first row shows a shift by +10% for each color and the second row -10%.

402D2D584343705B5B8A7373A48D8DC0A7A7DCC3C2F8DEDEFFFBFBFFFFFF
402D2D2A1818160000000000

Saturation Gradient

Similar to the brightness gradients but the following show a change of the Hex color 402D2D by changing the saturation by 10% instead.

402D2D402727402020401A1A401313400D0D400707400000
402D2D403333403A3A404040404747404D4D405353405A5A406060406767

Harmonies

Analogous

The analogous color harmony consists of three colors that are next to each other on the color wheel.

Triad

The triadic color harmony groups three colors that are evenly spaced from another and form a triangle on the color wheel.

Complementary

The complementary color scheme is a pair of colors which are on the opposite of each other on the color wheel.

Split Complementary

Split-complementary colors differ from the complementary color scheme. The scheme consists of three colors, the original color and two neighbors of the complement color.

Square

The square scheme is like the rectangle color scheme, but the four colors are evenly spaced on the color wheel.

Rectangle

The rectangle color scheme consists of four colors that form a rectangle on the color wheel.

Sweetspot

The sweet spot groups the original color and five complimentary colors.

402D2D544D4D402D402B2727ABABAB2B2B2B

SVG Images

A selection of SVG images using the hex version #402D2D of the current color.

#402D2D

Previews

White Background

This preview shows how the Hex color 402D2D looks on a white background. The color contrast ratio for these colors is 12.87, which passes the AAA level of the Web Content Accessibility Guidelines (WCAG) 2.0 for all text sizes. Details can be found at https://www.w3.org/TR/WCAG20/.

Black Background

This preview shows how the Hex color 402D2D looks on a black background. The color contrast ratio for these colors is 1.63, which fails to comply with the Web Content Accessibility Guidelines (WCAG) 2.0. Details can be found at https://www.w3.org/TR/WCAG20/.

Hex 402D2D Background

This preview shows how black text looks on a background with the Hex color 402D2D.

This preview shows how white text looks on a background with the Hex color 402D2D.


CSS Examples

The CSS property to change the color of the text to Hex 402D2D is called "color". The color property can be set on classes, ids or directly on the HTML element .text, #text, p{ color:#402D2D }.

This example shows how text in the color #402D2D looks like.

If you want to add a text shadow in that color use .shadow{ text-shadow: 4px 4px 2px #402D2D }.

Here you see how black text with a 4 pixel #402D2D colored shadow looks like.

Border

This example shows the color as border, it can be applied via the CSS property "border" or "border-color".

The CSS property to change the border of an element to Hex 402D2D is called "border". The border property can be set on classes, ids or directly on the HTML element .border, #border, table{ border:4px solid #402D2D }.

If only the border color should be changed .border{ border-color:#402D2D } can be used.

Here you see how a box with a 4 pixel #402D2D colored shadow looks like.

If you want to add a box shadow in that color use .boxshadow{ -moz-box-shadow:4px 4px 4px 4px #402D2D; -webkit-box-shadow:4px 4px 4px 4px #402D2D; box-shadow:4px 4px 4px 4px #402D2D }.

Background

The CSS property to change the background color of an element to Hex 402D2D is called "background". The background property can be set on classes, ids or directly on the HTML element .background, #background, body{ background:#402D2D }.

If only the background color should be changed .background{ background-color:#402D2D } can be used.

This example shows the color as background, it is applied via the CSS property "background".

To optimize and compress your CSS code you can use our online CSS compressor and optimizer based on csstidy.


About Converting Colors

Converting Colors allows you to convert between 15 different color formats (hex, rgb, rgb percent, cmy, cmyk, hsv, hsl, cielab, cielch, xyz, yxy, ryb, android, decimal, yuv).

To convert, paste a string in one of these color formats, for example, "402D2D", into the input field and click on convert. The result will be in the section Color Conversions, and the following sections will provide you with further details on the color.

Some color formats use the same notation, and the conversion will guess the composition of the search query. As an example, if you try to convert the string "0°, 30%, 25%" it could be an HSV or HSL color, the conversion will assume HSL in this case.

As this could lead to wrong conversions, you can define which format you are passing by wrapping your color string in brackets with the format in front. The search string "HSV(0°, 30%, 25%)" will give you the correct HSV color as there is no need to guess the format. Other examples would be "CIELAB(20.66, 8.75, 3.44)", "CIELCH(21, 9.401, 21.441)", "YXY(3.1562, 0.3678, 0.3292)" and "CMYK(0.00, 0.30, 0.30, 0.75)".

Follow Converting Colors on Twitter and check out my UWP apps and other tools.