MathWorks Blue Meets Air Force Academy Blue

I have always been fascinated by the names that are used to describe colors. There are dozens of web sites with lists of color names. I was surprised to discover that the shade of blue we use in MathWorks logo is almost the same as the one used by the United States Air Force Academy.

Contents

MathWorks logo.

Here is the "official" type font and color for a MathWorks® logo.

   clear
   M = imread('MW_logo.jpeg');
   M = imresize(M,1/6);
   imshow(M)

Let's retrieve the red, blue and green components of one pixel in the logo. This is MathWorks blue.

   mw_blue = double(squeeze(M(25,168,1:3))')
   show_rgb(mw_blue)
mw_blue =
     1    86   150

It's a medium blue with a bit of green and hardly any red.

Martin Krzywinski

Martin Krzywinski is a biologist, mathematician and artist at Canada's British Columbia Cancer Agency, Genome Sciences Centre. As befits his name, he maintains a crazy web site, chock full of all kinds of science and art. In particular, he has collected a list of 9,284 named colors from dozens of sources. The list includes 940 Pantone Colors, a standard in the printing industry, with "names" like PMS2945-C.

I won't display all 9,284 entries in his collection. Here is a sample of just a few of them from near the middle of the list,

   load krzy krzy names rgb
   k = 5000:5020;
   sample = krzy(k,:)
sample =
  21×4 table
     r      g      b                name            
    ___    ___    ___    ___________________________
    164     66    160    "ugly_purple"              
    164     90     82    "redwood"                  
    164     97     58    "footloose"                
    165      0     85    "violet_red"               
    165    101     49    "mai_tai"                  
    165    101     49    "style_pasifika_shore_sand"
    165    105     79    "sepia"                    
    165    107    109    "PMS4995"                  
    165     11     94    "jazzberry_jam"            
    165    110    117    "turkish_rose"             
    165    113    100    "blast_off_bronze"         
    165    126     82    "puce"                     
    165    139    111    "mongoose"                 
    165    149    120    "triple_sisal"             
    165    149    145    "triple_milestone"         
    165    150    146    "asteroid"                 
    165    151    132    "malta"                    
    165    153    130    "routeburn"                
    165    154    168    "siesta"                   
    165    155    145    "zorba"                    
    165    156     85    "gingko"                   

I'm going to compute the $l_1$ vector norm of the differences between all the rgb triples in Krzywinski's list and MathWorks blue. This norm isn't exactly the best way to compute the distance between colors, but it's good enough here. (Notice the singleton expansion, a 9254-by-3 array minus a 1-by-3 array.)

e = sum(abs(rgb - mw_blue),2);

Let's say that two colors are close to each other if this distance is less than 20. Here are the nearby colors.

   f = (e < 20);
   nearby = names(f)
   show_rgb([mw_blue; rgb(f,:)])
nearby = 
  7×1 string array
    "usafa_blue"
    "PMS2945"
    "endeavour"
    "PMS301"
    "peacock_blue"
    "bahama_blue"
    "medium_electric_blue"

The closest is usafa_blue, from the United States Air Force Academy in Colorado Springs. I didn't expect this.

   usafa_blue = rgb(find(f,1),:)
   distance = e(find(f,1))
usafa_blue =
     0    79   152
distance =
    10

Dodger Blue

I actually got started looking for these color matches by using the Krzywinski color lookup web service.

   query_url = 'http://mkweb.bcgsc.ca/colornames/namethatcolor/?';
   query = [query_url 'rgb=' sprintf('%d,', mw_blue)];
   web(query)

Here are the nearby colors, according to whatever criterion this service uses.

   type response.txt
dodger_blue (3.7)
dusk_blue (4.4)
bedazzled_blue (4.9)
cyan_cobalt_blue (5.0)
medium_electric_blue (5.5)
lapis_lazuli (5.5)
yale_blue (6.3)
azure (6.3)
st_tropaz (6.5)

I was intrigued by the appearance of dodger_blue and yale_blue on this list. In case you haven't heard of them, the Dodgers are one of the best U. S. baseball teams not in Boston or New York City and Yale is one of the better U.S. universities not located near Boston or in the San Francisco Bay Area.

There are five dodger_blue on the list,

   f = (names == 'dodger_blue');
   show_rgb([mw_blue; rgb(f,:)])

There is only one yale_blue.

   f = (names == 'yale_blue');
   show_rgb([mw_blue; rgb(f,:)])

xkcd

xkcd is a brilliant web comic strip that Randall Munroe started almost 15 years ago. One of Munroe's more serious projects was the xkcd color model. He surveyed over 220,000 people, asking them to name colors. This produced these 954 named colors.

You can download the list.

   load xkcd names rgb

Which colors are close to MathWorks blue?

   e = sum(abs(rgb - mw_blue),2);
   f = find(e < 72);
   nearby = names(f)
nearby = 
  23×1 string array
    "deep_turquoise"
    "deep_aqua"
    "dusk_blue"
    "deep_sea_blue"
    "petrol"
    "twilight_blue"
    "dark_aquamarine"
    "deep_teal"
    "peacock_blue"
    "light_navy"
    "light_navy_blue"
    "prussian_blue"
    "darkish_blue"
    "denim_blue"
    "teal_blue"
    "ocean"
    "bluegreen"
    "dark_aqua"
    "dark_cyan"
    "cobalt"
    "dark_turquoise"
    "ocean_blue"
    "sea_blue"

How close are they?

   show_rgb([mw_blue; rgb(f,:)])

Not so close. Actually the xkcd list is already included in the Krzywinski list.

usafa_blue

The closest I found was usafa_blue

   mw_blue
   usafa_blue
   show_rgb([mw_blue; usafa_blue])
mw_blue =
     1    86   150
usafa_blue =
     0    79   152

show_rgb

If you want to do this yourself.

   type show_rgb
function show_rgb(rgb)

   if any(max(rgb) > 1)
       rgb = double(rgb)/255;
   end
   
   n = size(rgb,1);
   set(gcf,'pos',[500 500 420 100*ceil(n/8)])
   clf
   axis([0 1 0 1/8])
   axis equal
   axis off
   noticks
   
   for k = 1:n
       patch([0 1 1 0 0]/9 + mod(k-1,8)/8, ...
             [0 0 1 1 0]/9 - .15*floor((k-1)/8), ...
             rgb(k,:)) 
   end  
end




Published with MATLAB® R2019b

|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.