How to use getColor method in wpt

Best JavaScript code snippet using wpt

cube.py

Source:cube.py Github

copy

Full Screen

...100 mat[i][j] = mat[N - i - 1][j]101 mat[N - i - 1][j] = temp 102 def rotateR(self, rotation, total):103 if(rotation == "R"):104 ext = [total[3][0][0].getColor(), total[3][0][1].getColor(), total[3][0][2].getColor()]105 for i in range(3):106 total[3][0][i].setColor(total[5][2][2 - i].getColor())107 108 for i in range(3):109 total[5][2][i].setColor(total[1][2][i].getColor())110 for i in range(3):111 total[1][2][i].setColor(total[4][2][i].getColor())112 113 for i in range(3):114 total[4][2][i].setColor(ext[2 - i])115 116 self.rotateFaceAntiClockwise(total[2], 3)117 118 else:119 ext = [total[1][2][0].getColor(), total[1][2][1].getColor(), total[1][2][2].getColor()]120 for i in range(3):121 total[1][2][i].setColor(total[5][2][i].getColor()) 122 for i in range(3):123 total[5][2][i].setColor(total[3][0][2 - i].getColor())124 for i in range(3):125 total[3][0][i].setColor(total[4][2][2 - i].getColor())126 127 for i in range(3):128 total[4][2][i].setColor(ext[i])129 self.rotateFaceClockwise(total[2], 3)130 def rotateL(self, rotation, total):131 if(rotation == "L"):132 ext = [total[1][0][0].getColor(), total[1][0][1].getColor(), total[1][0][2].getColor()]133 for i in range(3):134 total[1][0][i].setColor(total[5][0][i].getColor()) 135 for i in range(3):136 total[5][0][i].setColor(total[3][2][2 - i].getColor())137 for i in range(3):138 total[3][2][i].setColor(total[4][0][2 - i].getColor())139 140 for i in range(3):141 total[4][0][i].setColor(ext[i])142 143 self.rotateFaceAntiClockwise(total[0], 3)144 else:145 ext = [total[3][2][0].getColor(), total[3][2][1].getColor(), total[3][2][2].getColor()]146 for i in range(3):147 total[3][2][i].setColor(total[5][0][2 - i].getColor())148 149 for i in range(3):150 total[5][0][i].setColor(total[1][0][i].getColor())151 for i in range(3):152 total[1][0][i].setColor(total[4][0][i].getColor())153 154 for i in range(3):155 total[4][0][i].setColor(ext[2 - i])156 157 self.rotateFaceClockwise(total[0], 3)158 def rotateU(self, rotation, total):159 if(rotation == "U"):160 ext = [total[2][0][0].getColor(), total[2][1][0].getColor(), total[2][2][0].getColor()]161 for i in range(3): 162 total[2][i][0].setColor(total[3][i][0].getColor()) 163 164 for i in range(3):165 total[3][i][0].setColor(total[0][i][0].getColor())166 for i in range(3):167 total[0][i][0].setColor(total[1][i][0].getColor())168 for i in range(3):169 total[1][i][0].setColor(ext[i])170 self.rotateFaceAntiClockwise(total[5], 3)171 else:172 ext = [total[0][0][0].getColor(), total[0][1][0].getColor(), total[0][2][0].getColor()]173 for i in range(3):174 total[0][i][0].setColor(total[3][i][0].getColor()) 175 176 for i in range(3):177 total[3][i][0].setColor(total[2][i][0].getColor())178 179 for i in range(3):180 total[2][i][0].setColor(total[1][i][0].getColor())181 182 for i in range(3):183 total[1][i][0].setColor(ext[i])184 self.rotateFaceClockwise(total[5], 3)185 def rotateD(self, rotation, total):186 if(rotation == "D"):187 ext = [total[0][0][2].getColor(), total[0][1][2].getColor(), total[0][2][2].getColor()]188 for i in range(3):189 total[0][i][2].setColor(total[3][i][2].getColor()) 190 191 for i in range(3):192 total[3][i][2].setColor(total[2][i][2].getColor())193 194 for i in range(3):195 total[2][i][2].setColor(total[1][i][2].getColor())196 197 for i in range(3):198 total[1][i][2].setColor(ext[i])199 self.rotateFaceAntiClockwise(total[4], 3)200 else:201 ext = [total[2][0][2].getColor(), total[2][1][2].getColor(), total[2][2][2].getColor()]202 for i in range(3): 203 total[2][i][2].setColor(total[3][i][2].getColor()) 204 205 for i in range(3):206 total[3][i][2].setColor(total[0][i][2].getColor())207 for i in range(3):208 total[0][i][2].setColor(total[1][i][2].getColor())209 for i in range(3):210 total[1][i][2].setColor(ext[i])211 self.rotateFaceClockwise(total[4], 3)212 def rotateF(self, rotation, total):213 if(rotation == "F"):214 ext = [total[2][0][0].getColor(), total[2][0][1].getColor(), total[2][0][2].getColor()]215 for i in range(3):216 total[2][0][i].setColor(total[5][i][2].getColor())217 for i in range(3): 218 total[5][i][2].setColor(total[0][2][2 - i].getColor()) 219 220 for i in range(3):221 total[0][2][i].setColor(total[4][i][0].getColor()) 222 for i in range(3):223 total[4][2 - i][0].setColor(ext[i])224 225 self.rotateFaceAntiClockwise(total[1], 3)226 else:227 ext = [total[0][2][0].getColor(), total[0][2][1].getColor(), total[0][2][2].getColor()]228 for i in range(3):229 total[0][2][2 - i].setColor(total[5][i][2].getColor())230 for i in range(3): 231 total[5][i][2].setColor(total[2][0][i].getColor()) 232 233 for i in range(3):234 total[2][0][2 - i].setColor(total[4][i][0].getColor()) 235 for i in range(3):236 total[4][i][0].setColor(ext[i])237 self.rotateFaceClockwise(total[1], 3)238 def rotateB(self, rotation, total):239 if(rotation == "B"):240 ext = [total[0][0][0].getColor(), total[0][0][1].getColor(), total[0][0][2].getColor()]241 for i in range(3):242 total[0][0][2 - i].setColor(total[5][i][0].getColor())243 for i in range(3): 244 total[5][i][0].setColor(total[2][2][i].getColor()) 245 246 for i in range(3):247 total[2][2][2 - i].setColor(total[4][i][2].getColor()) 248 for i in range(3):249 total[4][i][2].setColor(ext[i])250 251 self.rotateFaceAntiClockwise(total[3], 3)252 253 else:254 ext = [total[2][2][0].getColor(), total[2][2][1].getColor(), total[2][2][2].getColor()]255 for i in range(3):256 total[2][2][i].setColor(total[5][i][0].getColor())257 for i in range(3): 258 total[5][2 - i][0].setColor(total[0][0][i].getColor()) 259 260 for i in range(3):261 total[0][0][i].setColor(total[4][i][2].getColor()) 262 for i in range(3):263 total[4][2 - i][2].setColor(ext[i])264 self.rotateFaceClockwise(total[3], 3)265 266 def rotateM(self, rotation, total):267 if(rotation == "M"):268 ext = [total[3][1][0].getColor(), total[3][1][1].getColor(), total[3][1][2].getColor()]269 for i in range(3):270 total[3][1][i].setColor(total[5][1][2 - i].getColor())271 272 for i in range(3):273 total[5][1][i].setColor(total[1][1][i].getColor())274 for i in range(3):275 total[1][1][i].setColor(total[4][1][i].getColor())276 277 for i in range(3):278 total[4][1][i].setColor(ext[2 - i])279 280 281 else:282 ext = [total[1][1][0].getColor(), total[1][1][1].getColor(), total[1][1][2].getColor()]283 for i in range(3):284 total[1][1][i].setColor(total[5][1][i].getColor()) 285 for i in range(3):286 total[5][1][i].setColor(total[3][1][2 - i].getColor())287 for i in range(3):288 total[3][1][i].setColor(total[4][1][2 - i].getColor())289 290 for i in range(3):...

Full Screen

Full Screen

sparkline-init.js

Source:sparkline-init.js Github

copy

Full Screen

1var gridbordercolor = "#eee";2var InitiateSparklineCharts = function () {3 return {4 init: function () {5 /*Bar*/6 var sparklinebars = $('[data-sparkline=bar]');7 $.each(sparklinebars, function () {8 $(this).sparkline('html', {9 type: 'bar',10 disableHiddenCheck: true,11 height: $(this).data('height'),12 width: $(this).data('width'),13 barColor: getcolor($(this).data('barcolor')),14 negBarColor: getcolor($(this).data('negbarcolor')),15 zeroColor: getcolor($(this).data('zerocolor')),16 barWidth: $(this).data('barwidth'),17 barSpacing: $(this).data('barspacing'),18 stackedBarColor: $(this).data('stackedbarcolor')19 });20 });21 /*Line*/22 var sparklinelines = $('[data-sparkline=line]');23 $.each(sparklinelines, function () {24 $(this).sparkline('html', {25 type: 'line',26 disableHiddenCheck: true,27 height: $(this).data('height'),28 width: $(this).data('width'),29 fillColor: getcolor($(this).data('fillcolor')),30 lineColor: getcolor($(this).data('linecolor')),31 spotRadius: $(this).data('spotradius'),32 lineWidth: $(this).data('linewidth'),33 spotColor: getcolor($(this).data('spotcolor')),34 minSpotColor: getcolor($(this).data('minspotcolor')),35 maxSpotColor: getcolor($(this).data('maxspotcolor')),36 highlightSpotColor: getcolor($(this).data('highlightspotcolor')),37 highlightLineColor: getcolor($(this).data('highlightlinecolor'))38 });39 });40 /*Composite Line*/41 var sparklinecompositelines = $('[data-sparkline=compositeline]');42 $.each(sparklinecompositelines, function () {43 $(this).sparkline('html', {44 type: 'line',45 disableHiddenCheck: true,46 height: $(this).data('height'),47 width: $(this).data('width'),48 lineColor: getcolor($(this).data('linecolor')),49 fillColor: getcolor($(this).data('fillcolor')),50 spotRadius: $(this).data('spotradius'),51 lineWidth: $(this).data('linewidth'),52 spotColor: getcolor($(this).data('spotcolor')),53 minSpotColor: getcolor($(this).data('minspotcolor')),54 maxSpotColor: getcolor($(this).data('maxspotcolor')),55 highlightSpotColor: getcolor($(this).data('highlightspotcolor')),56 highlightLineColor: getcolor($(this).data('highlightlinecolor'))57 });58 $(this).sparkline(stringtoarray($(this).attr("data-composite")), {59 type: 'line',60 disableHiddenCheck: true,61 height: $(this).data('height'),62 width: $(this).data('width'),63 lineColor: getcolor($(this).data('secondlinecolor')),64 fillColor: getcolor($(this).data('secondfillcolor')),65 lineWidth: $(this).data('secondlinewidth'),66 spotRadius: $(this).data('spotradius'),67 spotColor: getcolor($(this).data('spotcolor')),68 minSpotColor: getcolor($(this).data('minspotcolor')),69 maxSpotColor: getcolor($(this).data('maxspotcolor')),70 highlightSpotColor: getcolor($(this).data('highlightspotcolor')),71 highlightLineColor: getcolor($(this).data('highlightlinecolor')),72 composite: true73 });74 });75 /*Composite Bar*/76 var sparklinecompositebars = $('[data-sparkline=compositebar]');77 $.each(sparklinecompositebars, function () {78 $(this).sparkline('html', {79 type: 'bar',80 disableHiddenCheck: true,81 height: $(this).data('height'),82 width: $(this).data('width'),83 barColor: getcolor($(this).data('barcolor')),84 negBarColor: getcolor($(this).data('negbarcolor')),85 zeroColor: getcolor($(this).data('zerocolor')),86 barWidth: $(this).data('barwidth'),87 barSpacing: $(this).data('barspacing'),88 stackedBarColor: getcolor($(this).data('stackedbarcolor'))89 });90 $(this).sparkline(stringtoarray($(this).attr("data-composite")), {91 type: 'line',92 height: $(this).data('height'),93 disableHiddenCheck: true,94 width: $(this).data('width'),95 lineColor: getcolor($(this).data('linecolor')),96 fillColor: getcolor($(this).data('fillcolor')),97 spotRadius: $(this).data('spotradius'),98 lineWidth: $(this).data('linewidth'),99 spotRadius: $(this).data('spotradius'),100 spotColor: getcolor($(this).data('spotcolor')),101 minSpotColor: getcolor($(this).data('minspotcolor')),102 maxSpotColor: getcolor($(this).data('maxspotcolor')),103 highlightSpotColor: getcolor($(this).data('highlightspotcolor')),104 highlightLineColor: getcolor($(this).data('highlightlinecolor')),105 composite: true106 });107 });108 /*Tristate*/109 var sparklinetristates = $('[data-sparkline=tristate]');110 $.each(sparklinetristates, function () {111 $(this).sparkline('html', {112 type: 'tristate',113 disableHiddenCheck: true,114 height: $(this).data('height'),115 width: $(this).data('width'),116 posBarColor: getcolor($(this).data('posbarcolor')),117 negBarColor: getcolor($(this).data('negbarcolor')),118 zeroBarColor: getcolor($(this).data('zerobarcolor')),119 barWidth: $(this).data('barwidth'),120 barSpacing: $(this).data('barspacing'),121 zeroAxis: $(this).data('zeroaxis')122 });123 });124 /*Descrete*/125 var sparklinediscretes = $('[data-sparkline=discrete]');126 $.each(sparklinediscretes, function () {127 $(this).sparkline('html', {128 type: 'discrete',129 disableHiddenCheck: true,130 lineHeight: $(this).data('lineheight'),131 lineColor: getcolor($(this).data('linecolor')),132 thresholdValue: $(this).data('thresholdvalue'),133 thresholdColor: $(this).data('thresholdcolor')134 });135 });136 /*Bullet*/137 var sparklinebullets = $('[data-sparkline=bullet]');138 $.each(sparklinebullets, function () {139 $(this).sparkline('html', {140 type: 'bullet',141 disableHiddenCheck: true,142 targetColor: $(this).data('targetcolor'),143 performanceColor: $(this).data('performancecolor'),144 rangeColors: $(this).data('rangecolors')145 });146 });147 /*Box Plot*/148 var sparklinebox = $('[data-sparkline=box]');149 $.each(sparklinebox, function () {150 $(this).sparkline('html', {151 type: 'box',152 disableHiddenCheck: true,153 });154 });155 /*Pie*/156 var sparklinepie = $('[data-sparkline=pie]');157 $.each(sparklinepie, function () {158 $(this).sparkline('html', {159 type: 'pie',160 disableHiddenCheck: true,161 width: $(this).data('width'),162 height: $(this).data('height'),163 sliceColors: $(this).data('slicecolors'),164 borderColor: getcolor($(this).data('bordercolor'))165 });166 });167 }168 };169}();170function stringtoarray(str) {171 var myArray = str.split(",");172 for (var i = 0; i < myArray.length; i++) {173 myArray[i] = +myArray[i];174 }175 for (var i = 0; i < myArray.length; i++) {176 myArray[i] = parseInt(myArray[i], 10);177 }178 return myArray;...

Full Screen

Full Screen

rootcolors.py

Source:rootcolors.py Github

copy

Full Screen

1from ROOT import TColor, gROOT2kWhite = 0 #FFFFFF3kBlack = 1 #0000004kGray = 920 #CCCCCC5kRed = 632 #FF00006kPink = 900 #FF00337kMagenta = 616 #FF00FF8kViolet = 880 #CC00FF9kBlue = 600 #0000FF10kAzure = 860 #0033FF11kCyan = 432 #00FFFF12kTeal = 840 #00FFCC13kGreen = 416 #00FF0014kSpring = 820 #33FF0015kYellow = 400 #FFFF0016kOrange = 800 #FFCC0017kBird = 5718kViridis = 11219def get_color_hex(col):20 return gROOT.GetColor(col).AsHexString()21def lighten_color(col, percent):22 # This is not accurate. If accuracy is important, convert to HSL23 col_hex = get_color_hex(col)24 col_hex = int(col_hex.replace('#','0x'),16)25 r = (col_hex >> 16) + round(percent * 0.01 * 255)26 g = ((col_hex >> 8) & 0xFF) + round(percent * 0.01 * 255)27 b = (col_hex & 0xFF) + round(percent * 0.01 * 255)28 r = 0 if r<0 else 255 if r>255 else r29 g = 0 if g<0 else 255 if g>255 else g30 b = 0 if b<0 else 255 if b>255 else b31 col_hex = '#%02x%02x%02x' % (r,g,b)32 return TColor.GetColor(col_hex)33def darken_color(col, percent):34 return lighten_color(col, -percent)35#TColor.InitializeColors()36kRed2 = TColor.GetColor("#C02020")37kGreen2 = TColor.GetColor("#20C020")38kBlue2 = TColor.GetColor("#2020C0")39kCyan2 = TColor.GetColor("#20C0C0")40kMagenta2 = TColor.GetColor("#C020C0")41kYellow2 = TColor.GetColor("#C0C020")42kOrange2 = TColor.GetColor("#FFA533")43kGray2 = TColor.GetColor("#E8E8E8")44kYellow3 = TColor.GetColor("#BFAF00")45kOrange3 = TColor.GetColor("#FF9900")46kPurple2 = TColor.GetColor("#800080")47kOlive2 = TColor.GetColor("#808000")48kTeal2 = TColor.GetColor("#008080")49kMaroon2 = TColor.GetColor("#800000")50kNavy2 = TColor.GetColor("#000080")51kLime2 = TColor.GetColor("#008000")52kGold2 = TColor.GetColor("#DAA520")53kSalmon2 = TColor.GetColor("#FA8072")54kPistachio2 = TColor.GetColor("#93C572")55kBrown2 = TColor.GetColor("#964B00")56kCocoa2 = TColor.GetColor("#D2691E")57kTurquoise2 = TColor.GetColor("#40E0D0")58kQuark = TColor.GetColor("#EA6699")59kLepton = TColor.GetColor("#608060")60kBoson = TColor.GetColor("#20ABBF")61kFermion = TColor.GetColor("#D67F20")62# from http://ethanschoonover.com/solarized63# https://github.com/altercation/ethanschoonover.com/blob/master/resources/css/style.css64sBase03 = TColor.GetColor("#002b36")65sBase02 = TColor.GetColor("#073642")66sBase01 = TColor.GetColor("#586e75")67sBase00 = TColor.GetColor("#657b83")68sBase0 = TColor.GetColor("#839496")69sBase1 = TColor.GetColor("#93a1a1")70sBase2 = TColor.GetColor("#eee8d5")71sBase3 = TColor.GetColor("#fdf6e3")72sYellow = TColor.GetColor("#b58900")73sOrange = TColor.GetColor("#cb4b16")74sRed = TColor.GetColor("#dc322f")75sMagenta = TColor.GetColor("#d33682")76sViolet = TColor.GetColor("#6c71c4")77sBlue = TColor.GetColor("#268bd2")78sCyan = TColor.GetColor("#2aa198")79sGreen = TColor.GetColor("#859900")80ssBase3 = TColor.GetColor("#E3EAFD")81ssBase4 = TColor.GetColor("#FCF8E3")82ssBase5 = TColor.GetColor("#FDE3F8")83ssBase6 = TColor.GetColor("#EAFDE3")84#blkrgb = (kBlack, kBlue, kRed, kGreen)85#blkrgb = (kBlack, kNavy2, kMaroon2, kLime2)86blkrgb = map(lambda x: TColor.GetColor(x), ("#333333", "#0571b0", "#ca0020", "#008837", "#7b3294", "#e66101"))87# Very nice color palette stolen from tkgeometry88# https://code.google.com/p/tkgeometry/source/browse/trunk/src/Palette.cc89palette = map(lambda x: TColor.GetColor(x), ("#004586","#FF420E","#FFD320","#579D1C","#7E0021","#83CAFF","#314004","#AECF00","#4B1F6F","#FF950E","#C5000B","#0084D1"))90lightpalette = map(lambda x: TColor.GetColor(x), ("#79B7F2","#F29379","#FFEDA6","#B1F279","#F27999","#C2DEF2","#D4F279","#DFF279","#C791F2","#F2BD79","#F27980","#AAD7F2"))91# CTA blue, red, brown, green, orange, purple, pink, yellow92ctapalette = map(lambda x: TColor.GetColor(x), ("#00A2DF", "#D30D2B", "#653C20", "#00943D", "#FF460F", "#3B2C82", "#EE81A8", "#FFD500"))93#paletteSet1 = map(lambda x: TColor.GetColor(x), ("#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"))94#lightpaletteSet1 = map(lambda x: TColor.GetColor(x), ("#f28d8e", "#9bbfdc", "#a6d7a5", "#cca7d1", "#ffbf80", "#ffff99", "#d3ab94", "#fbc0df", "#cccccc"))95paletteSet1 = map(lambda x: TColor.GetColor(x), ("#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#a65628", "#f781bf", "#999999"))...

Full Screen

Full Screen

alerts.ts

Source:alerts.ts Github

copy

Full Screen

...18 fontWeight: 50019 }20 },21 standardSuccess: {22 color: getColor(theme.palette.success.main, 0.12),23 backgroundColor: hexToRGBA(theme.palette.success.main, 0.12),24 '& .MuiAlertTitle-root': {25 color: getColor(theme.palette.success.main, 0.12)26 },27 '& .MuiAlert-icon': {28 color: getColor(theme.palette.success.main, 0.12)29 }30 },31 standardInfo: {32 color: getColor(theme.palette.info.main, 0.12),33 backgroundColor: hexToRGBA(theme.palette.info.main, 0.12),34 '& .MuiAlertTitle-root': {35 color: getColor(theme.palette.info.main, 0.12)36 },37 '& .MuiAlert-icon': {38 color: getColor(theme.palette.info.main, 0.12)39 }40 },41 standardWarning: {42 color: getColor(theme.palette.warning.main, 0.12),43 backgroundColor: hexToRGBA(theme.palette.warning.main, 0.12),44 '& .MuiAlertTitle-root': {45 color: getColor(theme.palette.warning.main, 0.12)46 },47 '& .MuiAlert-icon': {48 color: getColor(theme.palette.warning.main, 0.12)49 }50 },51 standardError: {52 color: getColor(theme.palette.error.main, 0.12),53 backgroundColor: hexToRGBA(theme.palette.error.main, 0.12),54 '& .MuiAlertTitle-root': {55 color: getColor(theme.palette.error.main, 0.12)56 },57 '& .MuiAlert-icon': {58 color: getColor(theme.palette.error.main, 0.12)59 }60 },61 outlinedSuccess: {62 borderColor: theme.palette.success.main,63 color: getColor(theme.palette.success.main, 0.12),64 '& .MuiAlertTitle-root': {65 color: getColor(theme.palette.success.main, 0.12)66 },67 '& .MuiAlert-icon': {68 color: getColor(theme.palette.success.main, 0.12)69 }70 },71 outlinedInfo: {72 borderColor: theme.palette.info.main,73 color: getColor(theme.palette.info.main, 0.12),74 '& .MuiAlertTitle-root': {75 color: getColor(theme.palette.info.main, 0.12)76 },77 '& .MuiAlert-icon': {78 color: getColor(theme.palette.info.main, 0.12)79 }80 },81 outlinedWarning: {82 borderColor: theme.palette.warning.main,83 color: getColor(theme.palette.warning.main, 0.12),84 '& .MuiAlertTitle-root': {85 color: getColor(theme.palette.warning.main, 0.12)86 },87 '& .MuiAlert-icon': {88 color: getColor(theme.palette.warning.main, 0.12)89 }90 },91 outlinedError: {92 borderColor: theme.palette.error.main,93 color: getColor(theme.palette.error.main, 0.12),94 '& .MuiAlertTitle-root': {95 color: getColor(theme.palette.error.main, 0.12)96 },97 '& .MuiAlert-icon': {98 color: getColor(theme.palette.error.main, 0.12)99 }100 },101 filled: {102 fontWeight: 400103 }104 }105 }106 }107}...

Full Screen

Full Screen

utils.js

Source:utils.js Github

copy

Full Screen

...23/* --------------------------------- Colors --------------------------------- */24const getColor = (name, dom = document.documentElement) =>25 getComputedStyle(dom).getPropertyValue(`--falcon-${name}`).trim();26const getColors = dom => ({27 primary: getColor('primary', dom),28 secondary: getColor('secondary', dom),29 success: getColor('success', dom),30 info: getColor('info', dom),31 warning: getColor('warning', dom),32 danger: getColor('danger', dom),33 light: getColor('light', dom),34 dark: getColor('dark', dom)35});36const getSoftColors = dom => ({37 primary: getColor('soft-primary', dom),38 secondary: getColor('soft-secondary', dom),39 success: getColor('soft-success', dom),40 info: getColor('soft-info', dom),41 warning: getColor('soft-warning', dom),42 danger: getColor('soft-danger', dom),43 light: getColor('soft-light', dom),44 dark: getColor('soft-dark', dom)45});46const getGrays = dom => ({47 white: getColor('white', dom),48 100: getColor('100', dom),49 200: getColor('200', dom),50 300: getColor('300', dom),51 400: getColor('400', dom),52 500: getColor('500', dom),53 600: getColor('600', dom),54 700: getColor('700', dom),55 800: getColor('800', dom),56 900: getColor('900', dom),57 1000: getColor('1000', dom),58 1100: getColor('1100', dom),59 black: getColor('black', dom)60});61const settings = {62 tinymce: {63 theme: 'oxide'64 },65 chart: {66 borderColor: 'rgba(255, 255, 255, 0.8)'67 }68};...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var color = wpt.getColor();3console.log(color);4module.exports = {5 getColor: function(){6 return 'red';7 }8};9exports.getColor = function(){10 return 'red';11};12var wpt = require('wpt');13var redColor = new wpt.Color('red');14console.log(redColor.getColor());15module.exports = {16 Color: function(color){17 this.getColor = function(){18 return color;19 }20 }21};22exports.Color = function(color){23 this.getColor = function(){24 return color;25 }26};27var wpt = require('wpt');28var redColor = new wpt.Color('red');29console.log(redColor.getColor());

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var color = wpt.getColor('red');3console.log(color);4module.exports = {5 getColor: function (color) {6 return color;7 }8};9var wpt = require('wpt');10var color = wpt.getColor('red');11console.log(color);12exports.getColor = function (color) {13 return color;14};15var wpt = require('wpt');16var color = wpt.getColor('red');17console.log(color);18var color = wpt.getColor('green');19console.log(color);20exports.getColor = function (color) {21 return color;22};23exports.getAnotherColor = function (color) {24 return color;25};26var wpt = require('wpt');27var color = wpt.getColor('red');28console.log(color);29var color = wpt.getColor('green');30console.log(color);31exports.getColor = function (color) {32 return color;33};34exports.getAnotherColor = function (color) {35 return color;36};37var wpt = require('wpt');

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var color = wpt.getColor('red');3console.log(color);4exports.getColor = function (color) {5 return color;6};

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('./wpt.js');2var color = wpt.getColor();3console.log(color);4console.log(wpt.getColor());5module.exports = {6 getColor: function(){7 return 'red';8 }9}10var wpt = require('./wpt.js');11wpt.getColor();12module.exports = {13 getColor: function(){14 return 'red';15 }16}17var wpt = require('./wpt.js');18wpt.getColor();19module.exports = {20 getColor: function(){21 return 'red';22 }23}24var wpt = require('./wpt.js');25wpt.getColor();26var wpt = require('./wpt.js');27var color = wpt.getColor();28console.log(color);29module.exports = {30 getColor: function(){31 return 'red';32 }33}

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2var wpt = new WebPageTest('www.webpagetest.org','A.12345678901234567890123456789012');3wpt.getColor(function (err, data) {4 if (err) {5 console.log(err);6 } else {7 console.log(data);8 }9});10WebPageTest.prototype.getColor = function (callback) {11 var options = {12 };13 request(options, function (err, res, body) {14 if (err) {15 callback(err);16 } else {17 callback(null, body);18 }19 });20};21var WebPageTest = require('webpagetest');22var wpt = new WebPageTest('www.webpagetest.org','A.12345678901234567890123456789012');23wpt.getColor(function (err, data) {24 if (err) {25 console.log(err);26 } else {27 console.log(data);28 }29});30You are using the wrong module name. You are using ‘webpagetest’ but the module name is ‘wpt’. So you should use var wpt = require('wpt');31{ data: 'test' }32var WebPageTest = require('wpt');33var wpt = new WebPageTest('www.webpagetest.org','A.12345678901234567890123456789012');34wpt.getColor(function (err, data) {35 if (err) {36 console.log(err);37 } else {38 console.log(data);39 }40});

Full Screen

Using AI Code Generation

copy

Full Screen

1var wpt = require('wpt');2 console.log(color);3});4 console.log(color);5});6 console.log(color);7});8 console.log(color);9});10var wpt = require('wpt');11 console.log(color);12});13 console.log(color);14});15 console.log(color);16});17 console.log(color);18});19var http = require('http');20http.createServer(function (req, res) {21var http = require('http');22http.createServer(function (req, res) {23var http = require('http');24http.createServer(function (req, res) {25var http = require('http');26http.createServer(function (req, res) {

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful