[Question]
  [
## Challenge:
The challenge is to determine whether or not a color, given it's name, is one of the colors in the rainbow.
When supplied with a color, your program should output a truthy value if it is a color in the rainbow, and a falsy one otherwise.
## Rules:
1. The possible input options are exhaustive, and defined in the test cases. You can assume that you will not receive any other input than the ones defined
2. Character casing for inputs can be one of: UPPER, lower, or Title Case, but must be consistent
3. Standard [loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default?answertab=votes#tab-top) not allowed
## Test Cases:
**Truthy:**
* `red`
* `orange`
* `yellow`
* `green`
* `blue`
* `indigo`
* `violet`
**Falsy:**
* `purple`
* `brown`
* `pink`
* `cyan`
* `maroon`
 
### Leaderboard:
```
var QUESTION_ID=214678;
var OVERRIDE_USER=97730;
var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;function answersUrl(d){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+d+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(d,e){return"https://api.stackexchange.com/2.2/answers/"+e.join(";")+"/comments?page="+d+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(d){answers.push.apply(answers,d.items),answers_hash=[],answer_ids=[],d.items.forEach(function(e){e.comments=[];var f=+e.share_link.match(/\d+/);answer_ids.push(f),answers_hash[f]=e}),d.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(d){d.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),d.has_more?getComments():more_answers?getAnswers():process()}})}getAnswers();var SCORE_REG=function(){var d=String.raw`h\d`,e=String.raw`\-?\d+\.?\d*`,f=String.raw`[^\n<>]*`,g=String.raw`<s>${f}</s>|<strike>${f}</strike>|<del>${f}</del>`,h=String.raw`[^\n\d<>]*`,j=String.raw`<[^\n<>]+>`;return new RegExp(String.raw`<${d}>`+String.raw`\s*([^\n,]*[^\s,]),.*?`+String.raw`(${e})`+String.raw`(?=`+String.raw`${h}`+String.raw`(?:(?:${g}|${j})${h})*`+String.raw`</${d}>`+String.raw`)`)}(),OVERRIDE_REG=/^Override\s*header:\s*/i;function getAuthorName(d){return d.owner.display_name}function process(){var d=[];answers.forEach(function(n){var o=n.body;n.comments.forEach(function(q){OVERRIDE_REG.test(q.body)&&(o="<h1>"+q.body.replace(OVERRIDE_REG,"")+"</h1>")});var p=o.match(SCORE_REG);p&&d.push({user:getAuthorName(n),size:+p[2],language:p[1],link:n.share_link})}),d.sort(function(n,o){var p=n.size,q=o.size;return p-q});var e={},f=1,g=null,h=1;d.forEach(function(n){n.size!=g&&(h=f),g=n.size,++f;var o=jQuery("#answer-template").html();o=o.replace("{{PLACE}}",h+".").replace("{{NAME}}",n.user).replace("{{LANGUAGE}}",n.language).replace("{{SIZE}}",n.size).replace("{{LINK}}",n.link),o=jQuery(o),jQuery("#answers").append(o);var p=n.language;p=jQuery("<i>"+n.language+"</i>").text().toLowerCase(),e[p]=e[p]||{lang:n.language,user:n.user,size:n.size,link:n.link,uniq:p}});var j=[];for(var k in e)e.hasOwnProperty(k)&&j.push(e[k]);j.sort(function(n,o){return n.uniq>o.uniq?1:n.uniq<o.uniq?-1:0});for(var l=0;l<j.length;++l){var m=jQuery("#language-template").html(),k=j[l];m=m.replace("{{LANGUAGE}}",k.lang).replace("{{NAME}}",k.user).replace("{{SIZE}}",k.size).replace("{{LINK}}",k.link),m=jQuery(m),jQuery("#languages").append(m)}}
```
```
body{text-align:left!important}#answer-list{padding:10px;float:left}#language-list{padding:10px;float:left}table thead{font-weight:700}table td{padding:5px}
```
```
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn.sstatic.net/Sites/codegolf/primary.css?v=f52df912b654"> <div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td><a href="{{LINK}}">{{SIZE}}</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td><a href="{{LINK}}">{{SIZE}}</a></td></tr></tbody> </table> 
```
  
[Answer]
# [Haskell](https://www.haskell.org/), 28 bytes
```
(`elem`"albedo").(!!8).cycle
```
[Try it online!](https://tio.run/##XcwxEoIwEAXQ3lN8MxZQSG3DTSwIySZmWHYzAWS4vJHOGavXvZddJmKuoX/WZiCmeTCWR/Jq2q65Xh9t5w7HVGebBD28XoBckqy4wTIjnO5a/AJTyEOLlUg4zlN3xEIkGHkjJPEpKt5JmVbzlzSiaxfaX5W3kpkwFt0FOckEd1jBbIuqmPpxgW1c6t3l/AU "Haskell – Try It Online")
If we wrap the input and index at position `8`, the rainbow colors all yield a letter among `"albedo"`, but the non-rainbow colors do not (they yield a letter among `"rwpc"`).
```
redredre d red
orangeor a nge
yellowye l low
greengre e ngr
blueblue b lue
indigoin d igo
violetvi o let
purplepu r ple
brownbro w nbr
pinkpink p ink
cyancyan c yan
maroonma r oon
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 7 bytes
```
A`p
d|e
```
[Try it online!](https://tio.run/##BcFBCoAwDATA@/5D8Bue/IbVLiUYkxKsRfDvdSZ4i6Uxzes2lq0ifxwjmOGRrBAvVb2jBGnYtRFiWYrjEVfeqC2qEnt4N1SxE8ebDFcKd/sB "Retina 0.8.2 – Try It Online") Link includes test cases. Assumes input in lower case. Outputs non-zero for rainbow colours, zero for the other inputs. Explanation: Simply checks that the colour contains the letters `d` or `e` but not `p`.
64-byte version to check against the 21 specific cases of rainbow colours in three different capitalisations:
```
T`L`l`^[A-Z]+$|^.
^(red|orange|yellow|green|blue|indigo|violet)$
```
[Try it online!](https://tio.run/##JcxBCsIwEEbh/X@OChXROwgWN66KK8WS1AwlGCdlaC2FuXuMZvV4m09o8mzTpj6bdDUXE0x3P@5vj12l3QFdLeQ0iuWBdKUQ4qKDELH2YSb17PwQ9eNjoGlbpdQ2J7SNQ0u55CD5Jb/kzxKKhCLhL@EnoUgoEsZZxkDoJS6M0fMLz9Uy3lZi5C8 "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation: Either an uppercase input or the leading character is lowercased, after which the exact colours are matched.
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), ~~23~~ ~~19~~ ~~18~~ 12 bytes
```
^"rwpc"?*|9#
```
[Try it online!](https://tio.run/##FYpNCoQwDEbvEheOggfQWcxNhKqxlGaSEtQiePeart77fuIgsZR9mkFzWuHXP2NT9vYDiht8QdSxR5MbiSSbeEVk40Jn7QNvwYvJFYTwMEmnJqrTopLrMwWOhvV2Nf2dijB05QU "K (oK) – Try It Online")
Assumes input in lower case; based off of a flipped version of @Lynn's [Haskell answer](https://codegolf.stackexchange.com/questions/214678/is-it-a-rainbow-color/214687#214687).
* `9#` repeating-take 9 characters of the input, e.g. "purplepur"
* `*|` first-reverse, i.e. last
* `"rwpc"?` lookup character in the string "rwpc", returning either the index of the match, or a null if not present
* `^` check if `null`, i.e. convert nulls to `1` and actual indices to `0`
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 6 bytes
```
,2ḥ93Ḃ
```
[Try it online!](https://tio.run/##Dco9DoMwDAbQ/TtLpzJxnFCsKK2xI4sfZWXpSbp17IDEyEnSixje/J7EXNxv97p92qZuq9f9d7z/69fdqIdakEgoV9MF0YgEHU@EJH2Kijkp04g8WWZCZ7oIcpIXHiUIhmCqcgI "Jelly – Try It Online")
Uses the Jelly hashing function. 5 might be possible.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 7 bytes
Takes input in lower case.
```
CƵl%3%È
```
[Try it online!](https://tio.run/##yy9OTMpM/f/f@djWHFVj1cMd///nFyXmpacCAA "05AB1E – Try It Online") or [Verify all cases!](https://tio.run/##FYo9DsIwDEavUlnqViYGNjpwDMSQUCsyGDsytFVuwIU4AVKvlTrTe9@PvkMkrEs5PUboDucOxlIv24/7Y///1qFewXCCAdSCJHQpyKyrSzJEcUaeW08yUVKXhZTx45Jny9ymaLq2ZyZ5Ou4ltPQKpipw2wE)
`C` converts the color from binary. This allows digits higher than `1`, where upper case characters are `10` to `35` and lower case `36` to `61`:
```
C("red") = "r"*2**2 + "e"*2**1 + "d"*2**0 = 53*4 + 40*2 + 39 = 331
```
`Ƶl` is the compressed integer `148`, the code computes
```
is C(color)%148%3 Èven?
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~22~~ 21 bytes
```
f(int*s){s=*s/203&1;}
```
[Try it online!](https://tio.run/##JY7NbsMgEITvPMWKKhUQ9/9W6j5B1FtPbQ8bwA4qAWuxE0WRn90F97TfaGZWY@56Y5alEz6OKstrblV@eH58uX3S83LjowmTdfCWR@vT/eGdsZKDI/ooTslbCVcGYA5IoJDo66etGoCTs7wBnghj7ypdXAjpXKkn52KFfZhWy0fr@1Tp5FNwI2/@fwwTDWFN7Cmd18rg42@95oKrPiKlVOnjc7crrbkBpVCzgl0igW0Zpcs0DbjdShiorO8E3@RX2NjvWlTYQCcUSqnZvPwB "C (gcc) – Try It Online")
Inspired by ErikF's answer. I wrote a little program to brute-force the constants.
[Answer]
# [R](https://www.r-project.org/), ~~41~~ 33 bytes
```
sd(utf8ToInt(scan(,"")))%%.195<.1
```
[Try it online!](https://tio.run/##K/r/vzhFo7QkzSIk3zOvRKM4OTFPQ0dJSVNTU1VVz9DS1EbP8H9uYlF@ft5/AA "R – Try It Online")
Less elegant than [Giuseppe's solution](https://codegolf.stackexchange.com/a/214683/86301), but ~~3~~ 11 bytes shorter.
Converts the (lowercase) input to ASCII codepoints, takes the standard deviation of the resulting integers, then takes that modulo `0.195` (found by a grid search). The result is less than `0.1` iff the input is truthy.
[Answer]
# [Python 2](https://docs.python.org/2/), 22 bytes
```
lambda s:hash(s)%683%2
```
[Try it online!](https://tio.run/##FYrBCoJAFEXX9RVvM4yCbQoiggLNQYameTJkItXCCFEoFWc2fb29Wd1z77njz7VDv56bw2P@1N/Xuwa7b2vbBjZk292GkRomcND1cOdGpDziaGKdCYJKKIUlQWaE0JSJKvwudSozJLhJVOJKkBcmV14lBkv/zKU@U5yq2LdLbBA1f@6Xi3HqegecWVgdgVkODAIXQRO4MJz/ "Python 2 – Try It Online")
-1 thanks to [ovs](https://codegolf.stackexchange.com/users/64121/ovs), who used the extra degree of freedom afforded by the flexible input casing to save a byte.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~21~~ ~~14~~ ~~12~~ 10 bytes
```
“dʋ»e€µṪ<Ẹ
```
[Try it online!](https://tio.run/##DcsxDsIwDAXQ/Z@Jy6TEigLGjixKlQ2xMHAFToAYQQK6lY1bpBcxXZ/0NsRc3efjNf4u00jz6T492/u2ap@Xt/HxPS/ibhShFiQR6jJ0QDIiQcc9IUvMSXHIyrRH6a0woTMdBCXLFusaBLtgqvIH "Jelly – Try It Online")
Takes input in lowercase. Adaption of [Neil's method](https://codegolf.stackexchange.com/a/214685/66833)
Golfs:
* -10 bytes by changing the compressed string
* -5 bytes by adapting [coltim's method](https://codegolf.stackexchange.com/a/214681/66833)
* -2 bytes by using [Neil's method](https://codegolf.stackexchange.com/a/214685/66833)
## How it works
```
“dʋ»e€µṪ<Ẹ - Main link. Takes S on the left
“dʋ»       - Compressed string; Yield "dep"
     €     - For each character in "dep":
    e      -   Is it in S?
      µ    - Use this triplet as the new argument
       Ṫ   - Take the final element (1 if p is present, else 0)
         Ẹ - Are either "d" or "e" in S?
        <  - The tail is 0 and either "d" or "e" are in S
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~8~~ 7 bytes
```
9ịe“\Ṙ»
```
[Try it online!](https://tio.run/##DcoxDsIwDAXQ/d@od2FJqRWlGDuyKFW2qgsDF2DgCIwsVTY4SXoRw5vfSMzFvWv1TvvyPLTt8ane6vt729eXu9EAtSCRUP5VZ0QjEvQ8EZIMKSquSZkuyJNlJvSmsyAnOeFYguAcTFV@ "Jelly – Try It Online")
Get the ninth character (wrapping) and check if it's in the compressed string `“\Ṙ»` = `“albedo”`.
Port of my Haskell answer. caird saved a byte: the coincidence that *albedo* is an English word actually wins bytes over `9ịe“albedo` or `9ịḟ“rwpc`, owing to Jelly's compression dictionary.
[Answer]
# [R](https://www.r-project.org/), ~~35~~ ~~28~~ ~~27~~ 26 bytes
*Edit: -1 byte thanks to Dom Hastings, and -1 byte thanks to caird coinheringaahing*
```
!grepl("ro|p|c",scan(,''))
```
[Try it online!](https://tio.run/##XY5BDsMgDATvvILSQ0DKF/KTXghxIlTXRkCaRsrfqaOol5483l1rnVu7LRkSWpP5SEcwfQmebN91zrV3ZISqVPDVdg/qnLrrCeZIoH3R80qhRiZdWVcoVXtEHSmttah5@Ln249R/hUjqCg5BVJhMbzh7WkBgB0TeBOQISOaI66lHmuLCAtdXAmnNCU9rzLydyRTpKSPs/txePjOTcar4lHC3V2M/u/YF "R – Try It Online")
Regular-expression check.  
'maroon' + 'brown' both contain `'ro'`, 'purple' and 'pink' both contain `'p'`, and 'cyan' contains `'c'`.
[Answer]
# [R](https://www.r-project.org/), ~~60~~ 44 bytes
```
!scan(,"")%in%colors()[c(547,32,536,68,455)]
```
[Try it online!](https://tio.run/##BcFBCoMwEAXQ/b9FBSGBrKqxvUvpIsYhhE5nZNSKp0/fs9ZuW07iQtf5vkqfldU251/ZxfERhnuIwxSmZxhj9O9mtEAtSSFcxKwnihEJZj4IVZZaFL@qTDvWw1YmzKanYK3yQb6S4JtMVdof "R – Try It Online")
-13 thanks to Robin Ryder.
Takes input as all lowercase. Checks to see if the color is *not* one of the excluded colors.
Outgolfed by [Robin Ryder](https://codegolf.stackexchange.com/a/214691/67312) and [Dominic van Essen](https://codegolf.stackexchange.com/a/214711/67312).
[Answer]
# [Perl 5](https://www.perl.org/), ~~13~~ 12 bytes
*Edit: -1 byte by returning null string as falsy, thanks to Nahuel Fouilleul*
```
$_=!/ro|p|c/
```
[Try it online!](https://tio.run/##BcFBCsJADAXQ/T@FglvpyqVnkWkbhmDMD7G1FHp20/dC0h5Vt9fzOiSPOKahKmUGs3kX7GLGDT1FHKOtAvVZO/FTmiyINcMEY3JzhPr7gmlvjk9L0v@MRenfuluc "Perl 5 – Try It Online")
Same approach as [my R answer](https://codegolf.stackexchange.com/a/214711/95126) (with help from Dom Hastings + Caird Coinheringaahing), but probably better suited to [Perl]...
(Edit: realized that porting [Neil's Retina answer](https://codegolf.stackexchange.com/a/214685/95126) is ~~actually shorter at~~ ~~also only~~ now slightly longer at [13 bytes](https://tio.run/##BcFBCsJADAXQ/T@FQnEns3LZs8jU@QzBmITYWgqe3fG9YOptjOk@l/ZluZxLlDGSDZ7VOnFQ1Xf0JA2LboRYk@74iCtXxJahxJK@G0LsecLjqIZXTXf7eazi9h7X@AM))
[Answer]
## [WebAssembly Text Format](https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format), 111 bytes
```
(func(result i32)i32.const 0 i32.load i32.const 8 i32.load i32.add i32.const 13 i32.rem_s i32.const 7 i32.le_s)
```
This function operates on an integer memory array, that should start pre-filled with the chosen color (in Title Case) as a list of ascii code points. (strings can't be provided as normal function arguments in webassembly). The function will return 1 if its a rainbow color, or 0 if its not.
The actual logic behind the function is effectively the following: `return (mem[0] + mem[8]) % 13 <= 7`. (each character of the color takes 4 bytes in the memory array so byte-index 8 refers to a character-index 2). The actual WebAssembly Text Format is designed to feel like a stack machine, so instructions like `i32.const 8` puts an 8 onto the stack while `i32.add` will take two items off the stack, add them, and put the result back on.
The following is a complete WebAssembly file with the above function embedded inside.
```
(module
    (import "api" "mem" (memory 1))
    (func(result i32)i32.const 0 i32.load i32.const 8 i32.load i32.add i32.const 13 i32.rem_s i32.const 7 i32.le_s)
    (export "check" (func 0))
)
```
This can be compiled to a WebAssembly binary (a binary wasm file can be generated and downloaded through online wat to wasm conversion tools like [this one](https://mbebenita.github.io/WasmExplorer/)).
The following javascript runs the compiled binary. It contains the logic to create the memory array, pre-filled with a color. For convenience, it has the binary WebAssembly embedded in it.
```
// Byte array generated by putting the WAT text into https://mbebenita.github.io/WasmExplorer/
// then downloading the resulting wasm file
// then running [...require('fs').readFileSync('path/to/file.wasm')]
const bytes = new Uint8Array([0,97,115,109,1,0,0,0,1,133,128,128,128,0,1,96,0,1,127,2,140,128,128,128,0,1,3,97,112,105,3,109,101,109,2,0,1,3,130,128,128,128,0,1,0,6,129,128,128,128,0,0,7,137,128,128,128,0,1,5,99,104,101,99,107,0,0,10,153,128,128,128,0,1,147,128,128,128,0,0,65,0,40,2,0,65,8,40,2,0,106,65,13,111,65,7,76,11])
// Alternativly, you can read from the raw wasm file after generating it.
// const bytes = require('fs').readFileSync('./output.wasm')
async function initWaModule() {
  const mem = new WebAssembly.Memory({initial:1})
  const { instance } = await WebAssembly.instantiate(bytes, { api: {mem}, })
  return {
    isRainbowColor(color) {
      // Insert color param into memory
      const i32Array = new Uint32Array(mem.buffer);
      i32Array.fill(0)
      const colorAsCodePoints = [...color].map(c => c.charCodeAt(0))
      i32Array.set(colorAsCodePoints)
    
      // Run webassembly function
      return !!instance.exports.check()
    }
  }
}
const TRUE_COLORS = ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet']
const FALSE_COLORS = ['Purple', 'Brown', 'Pink', 'Cyan', 'Maroon']
;(async () => {
  const { isRainbowColor } = await initWaModule()
  console.log('These should be true')
  TRUE_COLORS.forEach(color => console.log(color, isRainbowColor(color)))
  console.log('These should be false')
  FALSE_COLORS.forEach(color => console.log(color, isRainbowColor(color)))
})()
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~14~~ 8 bytes
*-6 bytes thanks to [@ovs](https://codegolf.stackexchange.com/users/64121/ovs).*
```
'•³€å¤-à
```
[Try it online!](https://tio.run/##ASAA3/9vc2FiaWX//yfigKLCs@KCrMOlwqQtw6D//3llbGxvdw "05AB1E – Try It Online")
```
'•³€å¤-à  # full program
      -   # subtract...
     ¤    # last element of...
    å     # is...
   €      # each character of...
          # implicit input...
    å     # in...
'•³       # "deep"...
       -  # from...
          # (implicit) each element of...
    å     # is...
   €      # each character of...
          # implicit input...
    å     # in...
'•³       # "deep"
       à  # greatest element of list
          # implicit output
```
[Answer]
# JavaScript (ES9), 23 bytes
Similar to [Neil's Retina answer](https://codegolf.stackexchange.com/a/214685/58563), but with a negative lookbehind to prevent `pur**ple**` from being matched.
```
s=>/d|(?<!pl)e/.test(s)
```
[Try it online!](https://tio.run/##bc87DsIwDAbgnVvA0mSgPQAUNk7AVhjSxg0BE0dJ2qoSdw@oEwiP/j/Lj7saVeyC9WnrSEPu6xzrQ6Vf4rhfe5RQlQliElHmjlwkhBLJiKI5hyHd5mshd6tv6MUmgN7I/5iCcgY4mQGRJk5MAHActDiwo6zT1hAno/0UaZEfKi6uOSmM7Ct@CB7ZRW2gib3MW/fg8m5WbP9TBaJF8hs "JavaScript (Node.js) – Try It Online")
---
# JavaScript (ES6), 25 bytes
The case doesn't matter. Returns a Boolean value.
```
s=>parseInt(s,35)%385%3>1
```
[Try it online!](https://tio.run/##bc9NC4JAEAbgez9DCBUqCBGC0GPQvZt1WHW0rW1mmV0Vf/0WnormOO8zzMdDjco1rK3fIrUQuiK4orSKHZzRJ26T5ek6O@TrrNyHhtCRgZ2hPomrCw/@Pt/i9Lj6hi6JGNoo/Y@JFfYgyQzG0CRJzwAoQW0GcZTGVvckyag/hV/kh@IrVidlnPiKHdgacVHNNImXWY1PKW9mJfa/FBMtEt4 "JavaScript (Node.js) – Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 9 bytes
```
%%Cz283 2
```
[Try it online!](https://tio.run/##K6gsyfj/X1XVucrIwljB6P//gtKigpxUAA "Pyth – Try It Online")
*Answering my own question now that others have me beat... (FYI I solved this after posting)*
Explanation:
1. Converts to int with base 256
2. Modulo that by 283
3. Modulo by 2.
1 if rainbow color, 0 if not.
[Answer]
# [Japt](https://github.com/ETHproductions/japt) `-!`, ~~13~~ ~~9~~ 8 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
g8 k`Ã¾
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=Zzgga2DDAr4&footer=YAohVQ&input=WyJyZWQiLCJvcmFuZ2UiLCJ5ZWxsb3ciLCJncmVlbiIsImJsdWUiLCJpbmRpZ28iLCJ2aW9sZXQiLCJwdXJwbGUiLCJicm93biIsInBpbmsiLCJjeWFuIiwibWFyb29uIl0tbQ)
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~10~~ 9 bytes
```
›⁶³﹪⍘Ｓβ⁹⁴
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMO9KDWxJLVIw8xYR8E3P6U0J1/DKbE4NbgEKJuu4ZlXUFoCZWvqKCQBsaWJpqam9f//BaVFBTmp/3XLcgA "Charcoal – Try It Online") Link is to verbose version of code. Takes input in lower case. Output is a Charcoal boolean, i.e. `-` if rainbow, nothing if not. Explanation:
```
     Ｓ      Input word
    ⍘ β     Decoded as base 26 using lowercase alphabet
   ﹪   ⁹⁴   Modulo literal 94
›⁶³         Check whether 63 is greater than the result
            Implicitly print
```
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/) `PYTHONHASHSEED=2537`, 18 bytes
```
lambda x:hash(x)%2
```
[Try it online!](https://tio.run/##RY4xC8JAFIN3f0UQhXaog0UUoYOg0EkFXQSXa/vaHp7vHWerLfjf66GDGTIkkC@ZetRDKQ6abdt4h6MC4hRXhJ6MkRcqR8TITEu@L3QleGox1MC2zhpC5uTFsJpvyHvFuCsnwqNCRvCivBZEjMmXcMU//CV443g5p4d9ujmlp91um8wX8RK2b2rheLZClGNcJtfBqHtWKHTr2n8OunA6H6zT3ARl8B0KwjAceyrT8AE "Bash – Try It Online")
I'm pretty sure this is allowed. An environment variable is just like a command-line option, so this is considered a separate programming language to normal Python. Input in lowercase, outputs `1` or `0`.
[Answer]
# [Python 3](https://docs.python.org/3/ "Python 3"), ~~71~~ ~~56~~ 44 bytes
-15 bytes thanks to @Scott
-12 bytes thanks to @ovs
```
lambda s:(s[0]<'c'<'r'==s[1])==(s[0]in'pcm')
```
[Try it online!](https://tio.run/##HYrBDoIwEETP@hW9bZt40Hgj9EuQQ6EFN5bdZgEJX19bT/PmzaRzezM982RfObpl8E6tjV67e9/CCC0IWLt2j95Y@7dIkMYFTJ5YFCok1YEEDzdgcTSHAmeIkY8Cs4RAJYe4V4/kceYCX@QYtgJplxTrNAgf9ZmQPiXG09W2OGEm6JvrJQnSpieNxuQf "Python 3 – Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-n`, 18 bytes
```
p 255969480%$_.sum
```
[Try it online!](https://tio.run/##PU87SwNBEO7nVwwkdnqIGDFFmliIhRgsBKuw3g23g3szy@6sa/686@UQy@/B90jl49RWWNk8TiUYx0DIEovlSyTXewwshN5ldChUF@QMzROSDB2sZjf2OkUyNlaZFc5YtYQBE/VMX4Qqf5kYKSF9U18W69IqipYcz8Hjf4F5LaPvYH3EHa6PXbbEsUW82Wy2d9vb@@uLM1mm1l5pgJfkZCR4pxC0wmMiEtiHQvAkA48Kb6yBDA4lzedgn7QKHFg@4eHkBJ5dUpUfjedJuV3JLw "Ruby – Try It Online")
Input in Title Case, output is either a truthy integer or falsey zero.
---
\$255969480\$ is the lowest common multiple of the sums of all of the Title Cased truthy strings, which is also not a multiple of any of the sums of the Title Cased falsey strings. The reason I use Title Case is because the sums share a lot of common factors, reducing the length of the number. This could definitely be ported to various golfing languages to save lots of bytes, ~~which I might do.~~ see below!
---
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~14~~ 10 bytes
```
ÇO•F;_â•s%
```
[Try it online!](https://tio.run/##yy9OTMpM/f//cLv/o4ZFbtbxhxcB6WLV//99E4vy8/MA "05AB1E – Try It Online")
Same method as the above - input in Title Case, output as either 0 for false or a positive integer for true
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 34 bytes
Function takes a lowercase colour and returns `1` if it is rainbow colour, otherwise `0`.
To save space, I hash the first four characters of the colour with modulo 81 (the first number that didn't have collisions and had all printable remainders) and search for that in the list of hashes for the non-rainbow colours. If there is no match, then it is a rainbow colour.
```
f(int*s){s=!index("D@M1&",*s%81);}
```
[Try it online!](https://tio.run/##JY7BTsMwDIbvfQoTVJRkBWm3idKJA8fBjRNw8JK0i5YlldNuTFOfvSTl5M@yP/tXj51S89xy6wcZxS02d9Zr88vZ2@v7@oFVMpabtain@d565UZt4CUO2oanw7YokgQntJ6fg9UCbgWAOiCBRKKvnyb3AIyMZhWwQOg7k@lqnAuXTB0Z4zPs3biM0nPbhUxnG5wZWPV/ox@pd8vGnsJlUXrrj7mqKy79CSmETB@fu12ypgqkxLpI2Abi2KRQdYpWA65WAnpK6VvOyvgMpf7OosQKWi5RiLqY5j8 "C (gcc) – Try It Online")
I could save two bytes if returning `0` for a rainbow colour and non-zero for a non-rainbow was allowed:
```
f(int*s){!index("D@M1&",*s%81);}
```
[Try it online!](https://tio.run/##JY7BTsMwDIbveQoTVJRkBWm3iTDEgePgxgk4eEnaRWRJ5bYb09RnL0k5@bPsz/7NfWvMPDfCx0H18nrjo3W/gr@@vK3veK36arOWeppvfTRhtA6e@sH69HB4ZiwrcEQfxSl5K@HKAMwBCRQSfX5vSw/AyVleA0@EsXWFLi6EdC7UknOxwD6Myyg/920qdPIpuIHX/ze6kbqwbOwpnRel8/GnVHPBpT8ipVTo/WO3y9ZUg1KoWcYmkcBtDqVzNA24WknoKKdvBK/6R6jsVxEV1tAIhVJqNs1/ "C (gcc) – Try It Online")
[Answer]
# JavaScript (ES6), 20 bytes
```
s=>!/ro|p|c/.test(s)
```
[Try it online!](https://tio.run/##nY4xDsIwDEV3ThEihkaC9gCobHAJhERITQmEOHLSVFXp2QspCzAy@flb8vtXGaVXpF1YWaxgvHe7xipWstGXm3lB@HAPVeQBfMi8GNczhdajgdxgnfFADTAlPXgu1rM9J6j4knEkaWtI1IEx2CaqCcAmOJlmOmlb6RoTRf16GPghPyNtpbpkkZUb9ik6Lvo4sPKVLvp3wyyK4SjET5@zNP6rkGvImUl3Imwnv9P2lqbq5LTfJSHa/@zjEw)
How it works: Get a truthy value if `ro` is present, `p` is present, or `c` is present, then inverts that value so if they are present, the result is falsey, otherwise the result is truthy
[Look at the regex here (Regex101.com)](https://regex101.com/r/Xc6SF5/1)
# JavaScript (ES6), 22 bytes
```
s=>!/p|[^e]n$/.test(s)
```
[Try it online!](https://tio.run/##nY5BjsIwDEX3nCJEXTQSUw6Ayg4ugRgRUlMCwY6cNKhiOHuHlA2wZOXnb8nvn3TSwbD18QepgeHSrzs0ohZDqJfTuf/b/MIWi3kVIcQyqGExMYSBHFSO2lJG7kAYHSBItZhsJEMjZ0ISa2whUw/O0TVTywCYYe@68WSxsS1lSvbxMMptdSBeaXMsk6iX4lW0K27pLupHWtyeHcuk7julPvoctAtvhXzH3o26PdN19HuL5zxNr8f9opkIv7MP/w)
How it works: Get a truthy value if it starts with `p` or ends in `n` without an `e` before it. The `!` inverts that value so it returns true if no match and false if there is a match. I've tried multiple other regex's that end up being the same length, so i went with this one since it's easy enough to explain.
[Look at the Regex here (Regex101.com)](https://regex101.com/r/Hke4OC/1)
[Answer]
# [Python 3](https://docs.python.org/3/), ~~38~~ 31 bytes
-7 thanks to DLosc
```
lambda s:s[-2]in'egou'>'a'<s[1]
```
[Try it online!](https://tio.run/##FYpNDoIwEEbXeoqGzUAiC3VHlIsgiyJtbSwzzVAkhHD22q7e@378Fj6E96ifr@jkNIxSzM3c1bfeIihDC7Qg4TF31z5qYhGERdEBqxEuQCzRqCSbco7WJIaVwsTBLbm3OFpDSX6WnApJ/MLe5WlgWvPTW/wmvDeZ0ySZCKFvzifPFkOpiz0com7FrstQHUUV/w "Python 3 – Try It Online")
Just tests the second and second-to-last characters. Takes a different approach to [aidan0626's submission](https://codegolf.stackexchange.com/a/214694/89774) and doesn't rely on custom hash seeds like [pxeger's](https://codegolf.stackexchange.com/a/214708/89774).
[Answer]
# [Scala](http://www.scala-lang.org/), 17 bytes
```
_.product%237<132
```
Computes the product of the characters' ASCII values modulo 237 and checks whether the result is smaller than 132. Expects its input in title case.
[Try it online!](https://tio.run/##PY9BS8NAFITv/RXDUiEBFWwPgrSK8SAexNKC4Em2m2dYXd5bNxujlPz2mF2lp/c9ZmBmWqOdHmX/TiZiqy3vpQd9R@K6xa33OMyAL@1g23/1CrsYLDdYX6MScaQZ6/H13AepOxNPFsvL1cVyMQJvElAYrM6wo89CbalWp1BPQXNDiV7IOekT3QciTlC5LksPXNtGEj3bKSIm2nTBu6xWQfps31j@SPfuR@f/UQcRVmWZawN@KhodF62yLeYG4W/CDeaH457ClIMqJ/swG8Zf "Scala – Try It Online")
[Answer]
# [Canvas](https://github.com/dzaima/Canvas), 12 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
```
｛ｃ］∑“Ｎ＊.［„；％
```
[Try it here!](https://dzaima.github.io/Canvas/?u=JXVGRjVCJXVGRjQzJXVGRjNEJXUyMjExJXUyMDFDJXVGRjJFJXVGRjBBLiV1RkYzQiV1MjAxRSV1RkYxQiV1RkYwNQ__,i=Q3lhbg__,v=8)
same method as pxeger's answer.
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~46~~ ~~42~~ 41 bytes
Saved 4 bytes thanks to [gastropner](https://codegolf.stackexchange.com/users/75886/gastropner)!!!  
Saved a byte thanks to [Samathingamajig](https://codegolf.stackexchange.com/users/98937/samathingamajig)!!!
```
f(char*s){s=*s-80&&*s-77&&*s-67&s[3]-87;}
```
[Try it online!](https://tio.run/##ZVBta8IwEP7urzgCSqstc5Otjq4DX4KUdY2UORHbDyWms4xVafqhKP3tXRKrc1tIuCd399w9d9T8oLSuE41u47zL9SN3utwc9jsdYSxLmQerw9eDyBxadlWnWQFfcZppeuvYAnEUEQrGC76OwIEjCvAUGYBIMPJnWKIV9jyylGgWYOxLMPYWKuT6U3dGJHp3iYffJJovgrmnouOALFX63PVfpJ2sRur/OgoI8VFlKwlSEyv3jBZsc9Jwa8D/27@@DVWpp1tGP1kuqEp/WOK7sHyciHcvm139B@eWyS4HTfZNsw0rBa1vN/AJeHpgu0Q7K9JvGkf34rGh11PZOpyW@LNILmqdlqkSIvsSl91iEU00rv/2MuG9zP@Xts9FSqKhELV5iMB8hvYGBMzEaNyA2IDz@Mxx4qgpXbWq@hs "C (gcc) – Try It Online")
Inputs the colour all in caps and return \$1\$ for a colour of the rainbow or \$0\$ otherwise.
[Answer]
# x86 machine code, 8 bytes
Hexdump:
```
6b 01 e7 c1 e8 0a d6 c3
```
Multiplies the 32-bit value at string start by `-25`, and extracts bit 9 from the result. Returns `al = -1` for rainbow colours, and `al = 0` for non-standard ones.
Disassembly:
```
6B 01 E7             imul        eax,dword ptr [ecx],0FFFFFFE7h  
C1 E8 0A             shr         eax,0Ah  
??                   ?? ?? 
C3                   ret  
```
Here, `?? ??` represents the "undocumented" [`SALC` instruction](http://www.rcollins.org/secrets/opcodes/SALC.html).
[Answer]
# GAWK, 18 16 bytes
(*-2 thanks to Dominic van Essen*)
```
2>$0=/[de]/*!/p/
```
[Try it online!](https://tio.run/##SyzP/v/fyE7FwFY/OiU1Vl9LUb9A////gtKigpxUAA "AWK – Try It Online")
Translation of Neil's `has "d" or "e" but not "p"` logic. Uses `"2>"` to make sure the condition is always true for any input, and sets `$0` to truthy/falsey so that the default action, which is `print $0`, will output the result.
]