Code covered by the BSD License  

Highlights from
rgb.m

4.875

4.9 | 8 ratings Rate this file 37 Downloads (last 30 days) File Size: 3.71 KB File ID: #1805

rgb.m

by

 

06 Jun 2002 (Updated )

Convert colour names (blue,teal,pale green) into RGB triplets.

| Watch this File

File Information
Description

rgb(col) returns a Matlab RGB colour triplet [R G B] converted from 'col'.

'col' can be:
  an [R G B] triplet (unchanged)
  a colour name, e.g. 'pale orange'
  a matlab colour char (k,r,...)
  a QBASIC colour code (0-15)
  a DWORD colour code (0-0xFFFFFF)
  a DWORD BGR colour code

MATLAB release MATLAB 6.0 (R12)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (10)
05 Nov 2014 Paul Quelet

Excellent function! Works wonderfully!

19 Aug 2014 Chad Greene

By coincidence, this function works with the rgbmap function described here: http://www.mathworks.com/matlabcentral/fileexchange/46874-rgbmap-color-maps/content/rgbmapdemo/html/rgbmap_demo.html

06 Jun 2013 Alexandre Laurin  
07 Dec 2012 Ofir Perry Bibi  
30 Mar 2012 Paul  
22 Jun 2010 Matthew

Thanks for writing this, I find it very handy and use it often when I write scripts to plot various measurement data.

17 Oct 2008 lemes maykon

in my matlab no found the sistem RGB and HSI,how install this sistem? what do i do?

19 Sep 2007 Alvaro Semedo  
01 Nov 2006 GAbriella Musacchia

This was very helpful!

17 Aug 2005 Nick Williams

Just what I needed - the Matlab color space is large but it only allows limited navigation. This tool helps find your way around the colors much easier.

Contact us