colors() function in R Language is used to specify the shade of the color red, green, and blue between 0 and 1. Further the specified shades of these three basic components will be mixed to form a new shade. The shade of the colour red, green, and blue can also be specified between 0 and 255. But there will be an added argument max=255 while using this range. This function returns the corresponding hexadecimal code of the specified shade.
Syntax: rgb(a, b, c, max = 255)
a: shade of color red
b: shade of color green
c: shade of color blue
max: added argument max=255
 "#00FF80"  "#E6B3CC"  "#00B3FF"  "#000000"  "#FFFFFF"
 "#000000"  "#05073C"  "#FFFFFF"
- Generate a Vector of specified length with each element as a unique color on RGB scale in R Language - topo.colors() Function
- Generate a Vector of specified length with each element as a unique color on RB scale in RGB spectrum in R Language - cm.colors() Function
- Generate a Vector of specified length with each element as a unique color on RG scale in RGB spectrum in R Language - terrain.colors() Function
- Convert a Color to its rgb value in R Programming - col2rgb() Function
- Convert Colors from RGB to HSV in R Programming - rgb2hsv() Function
- Create a Range of Contiguous Colors Clustered around the Red Spectrum of the RGB Scale in R Programming - heat.colors() Function
- Get Indices of Specified Values of an Array in R Programming - arrayInd() Function
- Search and Return an Object with the specified name in R Programming - get() Function
- Get a List of Numbers in the Specified Range in R Programming - seq.int() Function
- Return an Object with the specified name in R Programming - get0() and mget() Function
- Extract word from a String at specified position in R Programming - word() Function
- Create Line Curves for Specified Equations in R Programming - curve() Function
- Rounding up to the Specified Number of Significant Digits in R Programming - signif() Function
- Trim a String to a Specified Display Width in R Programming - strtrim() Function
- Check if an Object of the Specified Name is Defined or not in R Programming - exists() Function
- Generate Factors with specified Levels in R Programming - gl() Function
- Draw a Polygon between specified points in R Programming - polygon() Function
- Replicating a Value to the Specified Length in R Programming - rep_len() Function
- Replicating a Value specified number of times in R Programming - rep.int() Function
- Generate a Sequence from 1 to any Specified Number in R Programming - seq_len() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Akanksha_Rai