snipt

Ctrl+h for KB shortcuts

CSS

rgba colors in IE 7 & IE 8

1
2
3
/* found here : http://stackoverflow.com/a/3977240 */
background: rgba(255, 255, 255, 0.3); /* browsers */
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#4cffffff', endColorstr='#4cffffff'); /* IE shit */
https://snipt.net/embed/6e770b31dd7181a60ba2d17f316037ac/
/raw/6e770b31dd7181a60ba2d17f316037ac/
6e770b31dd7181a60ba2d17f316037ac
css
CSS
3
2019-07-16T21:59:39
True
False
False
/api/public/snipt/43498/
rgba-colors-in-ie-7-ie-8
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c">/* found here : http://stackoverflow.com/a/3977240 */</span> </span><span id="L-2"><a name="L-2"></a><span class="nt">background</span><span class="o">:</span> <span class="nt">rgba</span><span class="o">(</span><span class="nt">255</span><span class="o">,</span> <span class="nt">255</span><span class="o">,</span> <span class="nt">255</span><span class="o">,</span> <span class="nt">0</span><span class="nc">.3</span><span class="o">);</span> <span class="c">/* browsers */</span> </span><span id="L-3"><a name="L-3"></a><span class="nt">filter</span><span class="o">:</span> <span class="nt">progid</span><span class="nd">:DXImageTransform</span><span class="nc">.Microsoft.gradient</span><span class="o">(</span><span class="nt">GradientType</span><span class="o">=</span><span class="nt">0</span><span class="o">,</span><span class="nt">startColorstr</span><span class="o">=</span><span class="s1">&#39;#4cffffff&#39;</span><span class="o">,</span> <span class="nt">endColorstr</span><span class="o">=</span><span class="s1">&#39;#4cffffff&#39;</span><span class="o">);</span> <span class="c">/* IE shit */</span> </span></pre></div> </td></tr></table>
"internet explorer", color, css, hack, ie7, ie8, rgba

CSS

IE RGBa transparent color

1
2
3
4
5
div{
background-color: transparent;
background-color: rgba(255, 255, 255,0.8);    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#80ffffff,endColorstr=#80ffffff);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#80ffffff,endColorstr=#80ffffff)";
}
https://snipt.net/embed/f1b55c3f4c8942c686a77e03b3b427e4/
/raw/f1b55c3f4c8942c686a77e03b3b427e4/
f1b55c3f4c8942c686a77e03b3b427e4
css
CSS
5
2019-07-15T18:12:57
True
False
False
/api/public/snipt/34581/
ie-rgba-transparent-color
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">div</span><span class="p">{</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">background-color</span><span class="o">:</span> <span class="nb">transparent</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="nb">background-color</span><span class="o">:</span> <span class="n">rgba</span><span class="p">(</span><span class="m">255</span><span class="o">,</span> <span class="m">255</span><span class="o">,</span> <span class="m">255</span><span class="o">,</span><span class="m">0</span><span class="o">.</span><span class="m">8</span><span class="p">);</span> <span class="n">filter</span><span class="o">:</span><span class="n">progid</span><span class="o">:</span><span class="n">DXImageTransform</span><span class="o">.</span><span class="n">Microsoft</span><span class="o">.</span><span class="n">gradient</span><span class="p">(</span><span class="n">startColorstr</span><span class="o">=</span><span class="m">#80ffff</span><span class="n">ff</span><span class="o">,</span><span class="n">endColorstr</span><span class="o">=</span><span class="m">#80ffff</span><span class="n">ff</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a><span class="o">-</span><span class="n">ms</span><span class="o">-</span><span class="n">filter</span><span class="o">:</span> <span class="s2">&quot;progid:DXImageTransform.Microsoft.gradient(startColorstr=#80ffffff,endColorstr=#80ffffff)&quot;</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
color, ie, rgba, transparent

C++

Color struct in C for colored terminal output. Just append to stdout and all text after wil be colored.

1
2
3
4
5
6
struct color {
// A structure with variables to color terminal output.
char red[] = "\033[0;31m";
char white[] = "\033[0;37m";
char yellow[] = "\033[0;33m";
}
https://snipt.net/embed/d81e88d928f9dc9c4a7bae284819df3e/
/raw/d81e88d928f9dc9c4a7bae284819df3e/
d81e88d928f9dc9c4a7bae284819df3e
cpp
C++
6
2019-07-16T01:48:55
True
False
False
/api/public/snipt/29821/
color-struct-in-c-for-colored-terminal-output-just-append-to-stdout-and-all-text-after-wil-be-colored
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">struct</span> <span class="n">color</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a><span class="c1">// A structure with variables to color terminal output.</span> </span><span id="L-3"><a name="L-3"></a><span class="kt">char</span> <span class="n">red</span><span class="p">[]</span> <span class="o">=</span> <span class="s">&quot;</span><span class="se">\033</span><span class="s">[0;31m&quot;</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a><span class="kt">char</span> <span class="n">white</span><span class="p">[]</span> <span class="o">=</span> <span class="s">&quot;</span><span class="se">\033</span><span class="s">[0;37m&quot;</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a><span class="kt">char</span> <span class="n">yellow</span><span class="p">[]</span> <span class="o">=</span> <span class="s">&quot;</span><span class="se">\033</span><span class="s">[0;33m&quot;</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
c, color, stdout, terminal

C#

Setting a color in c#

1
2
3
// Setting color of label
Label.ForeColor = System.Drawing.ColorTranslator.FromHtml("#ff6230");
Label.ForeColor = System.Drawing.Color.FromArgb( 255, 98, 48 );
https://snipt.net/embed/0ea648f1c7d16dd09931b1057c787fe3/
/raw/0ea648f1c7d16dd09931b1057c787fe3/
0ea648f1c7d16dd09931b1057c787fe3
csharp
C#
3
2019-06-14T07:24:18
True
False
False
/api/public/snipt/16974/
setting-a-color-in-c
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1">// Setting color of label</span> </span><span id="L-2"><a name="L-2"></a><span class="n">Label</span><span class="p">.</span><span class="n">ForeColor</span> <span class="p">=</span> <span class="n">System</span><span class="p">.</span><span class="n">Drawing</span><span class="p">.</span><span class="n">ColorTranslator</span><span class="p">.</span><span class="n">FromHtml</span><span class="p">(</span><span class="s">&quot;#ff6230&quot;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="n">Label</span><span class="p">.</span><span class="n">ForeColor</span> <span class="p">=</span> <span class="n">System</span><span class="p">.</span><span class="n">Drawing</span><span class="p">.</span><span class="n">Color</span><span class="p">.</span><span class="n">FromArgb</span><span class="p">(</span> <span class="m">255</span><span class="p">,</span> <span class="m">98</span><span class="p">,</span> <span class="m">48</span> <span class="p">);</span> </span></pre></div> </td></tr></table>
asp.net, c#, color, forecolor, label