PageSourceSearch

https://www.ipsl.fr/wp-content/themes/ipsltheme/ipsl/js/rgba.js?ver=1.0.0

js ipsl.fr collected 2026-09-24 09:00:40 UTC 1,656 bytes, 81 lines download raw bytes

1function RGBAClrPicker(v){
2s='<div id="RGBAClrPicker">'+ 
3'<span id="RGBAClrPicker_exit">X</span><br>'+ 
4'<input class="rgba-r" type="range" min="0" max="255" >R'+
5'<input class="rgba-g" type="range" min="0" max="255" >G'+
6'<input class="rgba-b" type="range" min="0" max="255" >B'+
7'<input class="rgba-a" type="range" min="0" max="10"  >A'+
8'<input class="clr" type="text">'+
9'</div>';
10
11return s;
12}
13
14function x2rgba(x){
15    var x=x.toLowerCase().replace(' ','');
16  
17  // case #45f
18  if(x.length==4){
19    ar=x.substr(1).split('');
20    for(i=0;i<ar.length;i++){
21      v=ar[i];
22      ar[i]=parseInt(v+''+v,16);
23    }
24    this.r=ar[0];
25    this.g=ar[1];
26    this.b=ar[2];
27    this.a=1;
28    this.s='rgba('+ar.join(', ')+', 1)';
29  }
30  
31  // case #4ab560
32  else if(x.length==7){
33    x=x.substr(1);
34    ar=[];
35    ar.push(x.substr(0,2));
36    ar.push(x.substr(2,2));
37    ar.push(x.substr(4,2));
38    for(i=0;i<ar.length;i++){
39      v=ar[i];
40      ar[i]=parseInt(v,16);
41    }
42    this.r=ar[0];
43    this.g=ar[1];
44    this.b=ar[2];
45    this.a=1;
46    this.s='rgba('+ar.join(', ')+', 1)';
47  }
48
49  // case rgb(r,g,b)
50  else if(x.split(',').length==3){
51    ar=x.split('(')[1].split(')')[0].split(',');
52    this.r=ar[0];
53    this.g=ar[1];
54    this.b=ar[2];
55    this.a=1;
56    this.s='rgba('+ar.join(', ')+', 1)';
57  }
58  
59  // case rgba(r,g,b,a)
60  else if(x.split(',').length==4){
61    ar=x.split('(')[1].split(')')[0].split(',');
62    this.r=ar[0];
63    this.g=ar[1];
64    this.b=ar[2];
65    this.a=ar[3];
66    this.s=x;
67  }
68  
69  // case var
70  else{
71    this.r=128;
72    this.g=128;
73    this.b=128;
74    this.a=1;
75    this.s='rgba(128, 128, 128, 1)';
76  }
77  
78  return this;
79}    
80
81// ok

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.