#2a5fab Color Information

#2a5fab Color Information
Details | Shades, Tints, and Tones | Variations | Color Coordinates | Color Schemes | HTML+CSS Examples | Coding & Programming | Color Blindness | Accessibility | Related Colors

The hexadecimal value (hex value) of this color is #2a5fab. In RGB, it consists of 16.5% Red, 37.3% Green, and 67.1% Blue. Likewise, in the CMYK color space, it consists of 75.4% Cyan, 44.4% Magenta, 0% Yellow, and 32.9% Black. On the color wheel, its Hue is found at 215.3°, with saturation of 60.6% and lightness of 41.8%. The decimal value for #2a5fab is 2777003, and its nearest "web safe" color is #336699. In the RGB color space, the strongest component for #2a5fab is blue. In the CMYK color space, its strongest component is cyan. And in the RYB color space, its strongest component is blue.
  • HexHex code for this color#2a5fab Copy
  • NameThe common name of this color(Unnamed) Copy
  • RGBRed, Green, Blue composition for this color42, 95, 171 Copy
  • RGB PercentPercent Red, Green, Blue composition for this color16.5%, 37.3%, 67.1% Copy
  • CMYCyan, Magenta, Yellow composition for this color0.835, 0.627, 0.329 Copy
  • CMYKCyan, Magenta, Yellow, Black composition for this color0.754, 0.444, 0, 0.329 Copy
  • HSLHue, Saturation, Lightness combination for this color215.3°, 60.6%, 41.8% Copy
  • HSV (or HSB)Hue, Saturation, Brightness combination for this color215.3°, 75.4%, 67.1% Copy
  • XYZCIE 1931 color space XYZ coordinates for this color12.398, 11.617, 40.117 Copy
  • RYBRed, Yellow, Blue composition for this color42, 80, 171 Copy
  • DecimalDecimal representation of this color's hex code2777003 Copy
  • CIE-LABCIELAB color space coordinates for this color40.601, 9.605, -45.792 Copy
  • CIE-LCHCIE-LCH color space coordinates for this color (chroma, hue, etc.)40.601, 46.788, 281.847 Copy
  • CIE-LUVCIE-LUV color space coordinates for this color40.601, -19.163, -67.442 Copy
  • Hunter LabHunter-Lab color space coordinates for this color34.084, 5.282, -45.927 Copy
  • xyYCIE xyY color space coordinates for this color0.193, 0.181, 11.617 Copy
  • AndroidValue of this color in Android development4280967083 / 0xff2a5fab Copy
  • Web SafeHex code of the nearest "web safe" version of this color#336699 Copy
Last Updated: March 27, 2025

Shades of #2a5fab

Shades are created by adding black to or removing lightness from a particular color. For #2a5fab, its pure hue is 215.3° on the color wheel and its saturation is 60.6%, and its lightness is 41.8%. As the amount of black is added to this hue and we reduce its lightness, the result is increasingly darker shades tints. The palette given below provides 9 different shades of #2a5fab, which — excluding black and our original color — range from #050c15 to #255396.

Tints of #2a5fab

Tints are created by adding white or lightness to a particular color. For #2a5fab, its pure hue is 215.3° on the color wheel and its saturation is 60.6%, and its lightness is 41.8%. As the amount of white (lightness) is added to this hue, the result is increasingly lighter tints. The following palette gives 9 different tints of #2a5fab, which — excluding white and our original color — range from #4573b6 to #e4ebf5.

Tones of #2a5fab

Tones are the result of adding gray to a pure hue. In the case of #2a5fab, its pure hue is 215.3° on the color wheel and its saturation is 60.6%, so we increase this saturation to create more colorful tones, and decrease the saturation to create grayer tones. The palette shown below gives 9 different tones of #2a5fab, which range from #6b6b6b (the grayest / 0% saturation) to #0058d5 (the most colorful / 100% saturation).

Variations of #2a5fab

There are several ways to create color variations and premutations of #2a5fab! For #2a5fab, there are 6 variations of the color that can be created by swapping its Red, Green, and Blue color positions, of which 5 are different from our original color. Among these six variations, there are 6 unique colors including our original color, #2a5fab. Click on these colors to learn more about them, too!

Color Coordinates of #2a5fab

This color, #2a5fab, consists of 16.5% Red, 37.3% Green, and 67.1% Blue, resulting in color coordinates Red = 42, Green = 95, Blue = 171. Likewise, the CMYK color space composition for #2a5fab is 75.4% Cyan, 44.4% Magenta, 0% Yellow, and 32.9% Black. These values are shown in the following charts and tables.

R16.5%
C75.4%
G37.3%
M44.4%
B67.1%
Y0.0%
K32.9%
Color Base R (Red) G (Green) B (Blue)
Decimal 42 95 171
Octal 52 137 253
Hexa #2a #5f #ab
Binary 00101010 01011111 10101011
Color Base C (Cyan) M (Magenta) Y (Yellow) Y (Black)
Decimal 75 44 0 32
Octal 113 54 0 40
Hexa #4b #2c #00 #20
Binary 01001011 00101100 00000000 00100000

Analogous Colors of #2a5fab

Analogous colors are located 30 degrees away from a color's hue on the color wheel. For #2a5fab — which has hue 215.3° — its analogous colors are located at 185.3° and 245.3° on the color wheel, with the same saturation and lightness as #2a5fab.

Triadic Colors of #2a5fab

Triadic colors are located 120 degrees away from a color's hue on the color wheel, which means the original color and its triadic colors are equidistant from one another on the color wheel and form a triangle. For #2a5fab — which has hue 215.3° — its triadic colors are located at 95.3° and 335.3° on the color wheel, with the same saturation and lightness as #2a5fab.

Complementary Color of #2a5fab

A complementary color is located opposite a color on the color wheel (180 degrees away). For #2a5fab — which has hue 215.3° — its complementary color is located at 35.3° on the color wheel, with the same saturation and lightness as #2a5fab.

Split Complementary Colors of #2a5fab

Split complementary colors are the analogs of a color's complement, which places them 210 degrees away on the color wheel from an original color. For #2a5fab — which has hue 215.3° — its split complementary colors its split complementary colors are located at 5.3° and 215.3° on the color wheel, with the same saturation and lightness as #2a5fab.

Tetradic Colors of #2a5fab

Tetradic colors are two sets of complementary colors on either side of a color wheel from each other, forming a rectangle on the color wheel. For #2a5fab — which has hue 215.3° — its tetradic colors are located at 125.3°, 215.3°, 305.3°, and 35.3° on the color wheel, with the same saturation and lightness as #2a5fab.

Monochromatic Colors of #2a5fab

Monochromatic colors are colors that share a common hue but that have different saturations and lightness. For #2a5fab, we show 9 different monochromatic colors of it, ranging from #20314b — (which has very low saturation and very low lightness) — to #5392ec (which has a very high saturation and very high lightness).

HTML+CSS Examples & Previews of #2a5fab

We want to make getting started with #2a5fab on your website fast and easy! Below are 8 examples of how to integrate #2a5fab into a website using HTML+CSS. These examples include showing how #2a5fab can be used to color text, backgrounds, shadows, and borders, as well as how it can be used as a solid fill or gradient fill for rectangles. These examples principally make use of <span> and <div> tags, although the CSS shown in particular can be repurposed to make use of #2a5fab with other HTML elements.

#2a5fab Foreground / Text Color

The color of this text is #2a5fab.
<span style="color: #2a5fab;">The color of this text is #2a5fab.</span>

#2a5fab Background Color

The background color for this text is #2a5fab.
<div style="background-color: #2a5fab; color:#ffffff; width:100%; height:100%; display: flex; justify-content: center; align-items: center;">The background color for this text is #2a5fab.</div>

#2a5fab Text Shadow Color

This color for the shadow of this text is #2a5fab.
<span style="text-shadow: 3px 3px 3px #2a5fab;">This color for the shadow of this text is #2a5fab.</span>

#2a5fab Border Color

This is a div with border color #2a5fab.
<div style="border: #2a5fab 4px solid;width:100%; height:100%; display: flex; justify-content: center; align-items: center;">This is a div with border color #2a5fab.</div>

#2a5fab Color Rectangle on a White Background

This is a rectangle of color #2a5fab on a white background.
<div style="background-color: #ffffff; padding: 60px; width:100%; height: 100%;"><div style="background-color: #2a5fab; color:#ffffff; width:100%; height:100%; padding: 10px; display: flex; justify-content: center; align-items: center;">This is a rectangle of color #2a5fab on a white background.</div></div>

#2a5fab Color Rectangle on a Black Background

This is a rectangle of color #2a5fab on a black background.
<div style="background-color: #000000; padding: 60px; width:100%; height: 100%;"><div style="background-color: #2a5fab; color:#ffffff; width:100%; height:100%; padding: 10px; display: flex; justify-content: center; align-items: center;">This is a rectangle of color #2a5fab on a black background.</div></div>

Gradient from #2a5fab to White

This is a gradient from #2a5fab to white.
<div style="background: -webkit-linear-gradient(left,#2a5fab,white); /* Firefox */ background: linear-gradient(to right,#2a5fab,white); /* Safari */ background: -o-linear-gradient(left,#2a5fab,white); /* Opera */ background: -moz-linear-gradient(left,#2a5fab,white); width:100%; height:100%; display: flex; justify-content: center; align-items: center;">This is a gradient from #2a5fab to white.</div>

Gradient from #2a5fab to Black

This is a gradient from #2a5fab to black.
<div style="background: -webkit-linear-gradient(left,#2a5fab,black); /* Firefox */ background: linear-gradient(to right,#2a5fab,black); /* Safari */ background: -o-linear-gradient(left,#2a5fab,black); /* Opera */ background: -moz-linear-gradient(left,#2a5fab,black); color: #ffffff; width:100%; height:100%; display: flex; justify-content: center; align-items: center;">This is a gradient from #2a5fab to black.</div>

Coding & Programming with #2a5fab

In addition to using #2a5fab on the web, we know you might want to use it in your mobile and desktop apps, too. Whatever your needs, the table below shows how to access #2a5fab in the language and environment of your choice. These code snippets are principally the hexadecimal representation of #2a5fab, or the RGB color coordinates for the same (Red = 42, Green = 95, Blue = 171). If you need details about the color coordinates of #2a5fab in other color spaces, refer to these details as provided toward the top of this page.

Language Environment Code Snippet
HTML + CSS (Hex Code) Web #2a5fab
HTML + CSS (RGB Code) Web rgb(42, 95, 171)
CSS Background Color Web .myclass { background-color: #2a5fab; }
CSS Foreground + Text Color Web .myclass { color: #2a5fab; }
CSS Border Color Web .myclass { border: 2px solid #2a5fab; }
Java (Multi-platform) new Color(42, 95, 171);
Python (Multi-platform) Color("#2a5fab")
Swift iOS UIColor(red:42, green:95, blue:171, alpha:1.0000)
Objective-C (iOS) iOS [UIColor colorWithRed:42 green:95 blue:171 alpha:1.0000];
OpenGL (Graphics) glColor3f(42f, 95f, 171f);
C# / .NET Windows Color.FromArgb(42, 95, 171);
 

#2a5fab Color Blindness

Not everyone can see #2a5fab the same way. For those with color blindness, #2a5fab might look very, very different. Here, we simulate eight examples of color blindness, and how #2a5fab looks next to each one of them. In all cases, #2a5fab is placed in a circle in the upper-left corner of each of the below boxes, with the color in the rest of those boxes signifying how #2a5fab looks for someone with that type of color blindness. Many people will perceive close similarities between the colors in these boxes and the colors in the circles — with some noticing particular similarities. We offer this insight so that as you make choices about colors to use for your purposes, you can make an informed decision about whether #2a5fab will be a good fit for everyone in your audience!

Trichromacy

Protanomaly
Affects 1 in 100 Men & 1 in 10,000 Women

Deuteranomaly
Affects 1 in 17 Men & 1 in 250 Women

Tritanomaly
Affects 1 in 10,000

Dichromacy

Protanopia
Affects 1 in 100, Mostly Men

Deuteranopia
Affects 1 in 100, Mostly Men

Tritanopia
Affects 1 in 100,000

Monochromacy

Achromatopsia
Affects 1 in 20,000

Achromatopsia
Affects 1 in 100,000

Accessibility

Not Accessibility Recommended

We analyzed whether #2a5fab is an accessible color when used as a text / foreground color against a white background. This analysis is based on the Web Content Accessibility Guidelines (WCAG) 2 Level issued by W3C. Based on this analysis, we calculate a contrast ratio against white of approximately 6.3:1 against white. While there are some situations where this contrast is high enough to be considered accessible under the AA or AAA level standards, it is not high enough to be considered accessible in all cases. Details about the specific circumstances where #2a5fab would and would not be an accessible foreground color are summarized below.

WCAG AA
Normal Size Text

WCAG AA
Large Size Text

WCAG AAA
Normal Size Text

WCAG AAA
Large Size Text