[ Launch: rgb thing ] 0ab463796fba0d9c339a by georules
[ Launch: test ] 4653053 by enjalot
[ Launch: test ] 4652017 by enjalot
[ Launch: test ] 4582399 by enjalot
-
-
Save georules/0ab463796fba0d9c339a to your computer and use it in GitHub Desktop.
rgb thing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"description":"rgb thing","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"tab":"edit","display_percent":0.7,"thumbnail":"http://i.imgur.com/7RBMqKo.png","fullscreen":false,"ajax-caching":true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var svg = d3.select("svg") | |
var red = 255; | |
var green = 255; | |
var blue = 255; | |
var rr = "rgb("+red+",0,0)" | |
var gg = "rgb(0,"+green+",0)" | |
var bb = "rgb(0,0,"+blue+")" | |
var color = "rgb("+red+","+green+","+blue+")" | |
var totalcolor | |
svg.append("rect") | |
.attr("width", "100%") | |
.attr("height", "100%") | |
.attr("fill", color); | |
var x = 198 | |
var y = 173 | |
var h = 341 | |
var w = 100 | |
svg.append("rect") | |
.attr({ | |
width: w, | |
height: h, | |
x: x, | |
y: y, | |
fill: rr | |
}); | |
svg.append("rect") | |
.attr({ | |
width: w, | |
height: h, | |
x: x+w, | |
y: y, | |
fill: gg | |
}); | |
svg.append("rect") | |
.attr({ | |
width: w, | |
height: h, | |
x: x+w*2, | |
y: y, | |
fill: bb | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment