Hex representation of a color with alpha channel?
Is there a W3 or any other noteworthy standard on how to represent a color (including alpha channel) in hex format?
Is it #RGBA or #ARGB ?
colors standards
add a comment |
Is there a W3 or any other noteworthy standard on how to represent a color (including alpha channel) in hex format?
Is it #RGBA or #ARGB ?
colors standards
5
It's coming in CSS Color Level 4 source (see fourth bullet point)
– Šime Vidas
May 6 '13 at 12:37
@ŠimeVidas if you had put that in an answer, I'd have upvoted you.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 13 '14 at 11:56
@cirosantilli Do I look like I need the rep?:-P
– Šime Vidas
Feb 14 '14 at 0:56
1
@ŠimeVidas lol, if you care to share some then... =)
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 14 '14 at 7:55
There's a similar CSS-specific question about this here: CSS hexidecimal RGBA?
– James Donnelly
Jan 6 '16 at 15:29
add a comment |
Is there a W3 or any other noteworthy standard on how to represent a color (including alpha channel) in hex format?
Is it #RGBA or #ARGB ?
colors standards
Is there a W3 or any other noteworthy standard on how to represent a color (including alpha channel) in hex format?
Is it #RGBA or #ARGB ?
colors standards
colors standards
edited Nov 5 '13 at 0:40
Patrick Klug
asked Sep 14 '09 at 2:28
Patrick KlugPatrick Klug
9,185961104
9,185961104
5
It's coming in CSS Color Level 4 source (see fourth bullet point)
– Šime Vidas
May 6 '13 at 12:37
@ŠimeVidas if you had put that in an answer, I'd have upvoted you.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 13 '14 at 11:56
@cirosantilli Do I look like I need the rep?:-P
– Šime Vidas
Feb 14 '14 at 0:56
1
@ŠimeVidas lol, if you care to share some then... =)
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 14 '14 at 7:55
There's a similar CSS-specific question about this here: CSS hexidecimal RGBA?
– James Donnelly
Jan 6 '16 at 15:29
add a comment |
5
It's coming in CSS Color Level 4 source (see fourth bullet point)
– Šime Vidas
May 6 '13 at 12:37
@ŠimeVidas if you had put that in an answer, I'd have upvoted you.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 13 '14 at 11:56
@cirosantilli Do I look like I need the rep?:-P
– Šime Vidas
Feb 14 '14 at 0:56
1
@ŠimeVidas lol, if you care to share some then... =)
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 14 '14 at 7:55
There's a similar CSS-specific question about this here: CSS hexidecimal RGBA?
– James Donnelly
Jan 6 '16 at 15:29
5
5
It's coming in CSS Color Level 4 source (see fourth bullet point)
– Šime Vidas
May 6 '13 at 12:37
It's coming in CSS Color Level 4 source (see fourth bullet point)
– Šime Vidas
May 6 '13 at 12:37
@ŠimeVidas if you had put that in an answer, I'd have upvoted you.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 13 '14 at 11:56
@ŠimeVidas if you had put that in an answer, I'd have upvoted you.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 13 '14 at 11:56
@cirosantilli Do I look like I need the rep?
:-P
– Šime Vidas
Feb 14 '14 at 0:56
@cirosantilli Do I look like I need the rep?
:-P
– Šime Vidas
Feb 14 '14 at 0:56
1
1
@ŠimeVidas lol, if you care to share some then... =)
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 14 '14 at 7:55
@ŠimeVidas lol, if you care to share some then... =)
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 14 '14 at 7:55
There's a similar CSS-specific question about this here: CSS hexidecimal RGBA?
– James Donnelly
Jan 6 '16 at 15:29
There's a similar CSS-specific question about this here: CSS hexidecimal RGBA?
– James Donnelly
Jan 6 '16 at 15:29
add a comment |
5 Answers
5
active
oldest
votes
In CSS 3, to quote from the spec, "there is no hexadecimal notation for an RGBA value" (see CSS Level 3 spec). Instead you can the use rgba() functional notation with decimals or percentages, e.g. rgba(255, 0, 0, 0.5) would be 50% transparent red. RGB channels are 0-255 or 0%-100%, alpha is 0-1.
In CSS 4*, you can specify the alpha channel using the 7th and 8th characters of an 8 digit hex colour, or 4th character of a 4 digit hex colour (see CSS Level 4 spec*)
Browser support as of Sept 2018
- Firefox has supported this syntax since Firefox 49 (Mozilla bug 567283).
- Safari has supported this syntax since Safari 10.
- Chrome has supported this syntax since Chrome 62. For earlier versions you could enable experimental web features to use this syntax. See Chromium Issue 618472 and Webkit bug 150853.
- Android Apps that target Android P or newer can use this syntax
- Opera supports this syntax in Opera 52 (or Opera 39 when experimental web features are enabled).
- IE 11 and EdgeHTML 17 (Edge 42) do not support this syntax.
Up to date browser support information is available on CanIUse.com
*Technically still in draft, but given the browser support this is unlikely to be changed.
2
As of now, Mozilla (Firefox 49) appears to support #RRGGBBAA and #RGBA
– Shiyaz
Oct 14 '16 at 14:06
For current browser support info, see caniuse.com/#feat=css-rrggbbaa
– Stony
Nov 25 '17 at 22:44
add a comment |
It looks like there is no hex alpha format: http://www.w3.org/TR/css3-color/
Anyway, if you use a CSS preprocessor like SASS then you can pass an hex to rgba
:
background:
rgba(#000, 0.5);
And the preprocessor just converts the hex code to rgb automatically.
4
Very cool. Thanks for mentioning!
– AndrewHenderson
Apr 26 '13 at 0:56
add a comment |
I'm not sure if there is an official standard-
RGBA is the representation I've seen for Web
Macromedia and others use ARGB
I believe that RGBA is the more common representation.
If it helps this is from W3 for CSS3
http://www.w3.org/TR/css3-color/#rgba-color
EDIT (Patrick): quote from the above W3 link
Unlike RGB values, there is no hexadecimal notation for an RGBA value
2
Also, the CSS function for specifying colors with alphas is rgba()
– Amber
Sep 14 '09 at 2:51
8
from the W3 link you posted: Unlike RGB values, there is no hexadecimal notation for an RGBA value.
– Patrick Klug
Sep 14 '09 at 4:18
2
I've seen #RGB,A before. Weird.
– Joshua
Oct 3 '11 at 20:19
For Android drawables, it appears to be ARGB: developer.android.com/reference/android/graphics/drawable/…
– Derek Kurth
Sep 27 '12 at 16:56
add a comment |
Chrome 52+ supports alpha hex:
background: #56ff0077;
For older browsers, you'll have to use:
background-color: rgba(255, 220, 0, 0.3);
2
No it doesn't, unless you enable experimental web features, because it was causing problems on Android. See my answer above for browser support details.
– thelem
Feb 27 '17 at 17:26
add a comment |
You could try putting the hex color into the color picker of GIMP or photo shop to get the RGB value and then using the alpha value. eg. red is #FF0000
or rgb(255,0,0
) if you want red with an alpha value of .5 then rgba(255,0,0,.5)
.
Maybe not exactly what you wanted but hopefully helps.
1
This was voted down, which seems a bit harsh. It doesn't answer the question asked, but the question doesn't say why they want to know. If they just want to use an RGBA colour in CSS, then this answer is correct.
– thelem
Jun 24 '15 at 14:37
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1419448%2fhex-representation-of-a-color-with-alpha-channel%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
In CSS 3, to quote from the spec, "there is no hexadecimal notation for an RGBA value" (see CSS Level 3 spec). Instead you can the use rgba() functional notation with decimals or percentages, e.g. rgba(255, 0, 0, 0.5) would be 50% transparent red. RGB channels are 0-255 or 0%-100%, alpha is 0-1.
In CSS 4*, you can specify the alpha channel using the 7th and 8th characters of an 8 digit hex colour, or 4th character of a 4 digit hex colour (see CSS Level 4 spec*)
Browser support as of Sept 2018
- Firefox has supported this syntax since Firefox 49 (Mozilla bug 567283).
- Safari has supported this syntax since Safari 10.
- Chrome has supported this syntax since Chrome 62. For earlier versions you could enable experimental web features to use this syntax. See Chromium Issue 618472 and Webkit bug 150853.
- Android Apps that target Android P or newer can use this syntax
- Opera supports this syntax in Opera 52 (or Opera 39 when experimental web features are enabled).
- IE 11 and EdgeHTML 17 (Edge 42) do not support this syntax.
Up to date browser support information is available on CanIUse.com
*Technically still in draft, but given the browser support this is unlikely to be changed.
2
As of now, Mozilla (Firefox 49) appears to support #RRGGBBAA and #RGBA
– Shiyaz
Oct 14 '16 at 14:06
For current browser support info, see caniuse.com/#feat=css-rrggbbaa
– Stony
Nov 25 '17 at 22:44
add a comment |
In CSS 3, to quote from the spec, "there is no hexadecimal notation for an RGBA value" (see CSS Level 3 spec). Instead you can the use rgba() functional notation with decimals or percentages, e.g. rgba(255, 0, 0, 0.5) would be 50% transparent red. RGB channels are 0-255 or 0%-100%, alpha is 0-1.
In CSS 4*, you can specify the alpha channel using the 7th and 8th characters of an 8 digit hex colour, or 4th character of a 4 digit hex colour (see CSS Level 4 spec*)
Browser support as of Sept 2018
- Firefox has supported this syntax since Firefox 49 (Mozilla bug 567283).
- Safari has supported this syntax since Safari 10.
- Chrome has supported this syntax since Chrome 62. For earlier versions you could enable experimental web features to use this syntax. See Chromium Issue 618472 and Webkit bug 150853.
- Android Apps that target Android P or newer can use this syntax
- Opera supports this syntax in Opera 52 (or Opera 39 when experimental web features are enabled).
- IE 11 and EdgeHTML 17 (Edge 42) do not support this syntax.
Up to date browser support information is available on CanIUse.com
*Technically still in draft, but given the browser support this is unlikely to be changed.
2
As of now, Mozilla (Firefox 49) appears to support #RRGGBBAA and #RGBA
– Shiyaz
Oct 14 '16 at 14:06
For current browser support info, see caniuse.com/#feat=css-rrggbbaa
– Stony
Nov 25 '17 at 22:44
add a comment |
In CSS 3, to quote from the spec, "there is no hexadecimal notation for an RGBA value" (see CSS Level 3 spec). Instead you can the use rgba() functional notation with decimals or percentages, e.g. rgba(255, 0, 0, 0.5) would be 50% transparent red. RGB channels are 0-255 or 0%-100%, alpha is 0-1.
In CSS 4*, you can specify the alpha channel using the 7th and 8th characters of an 8 digit hex colour, or 4th character of a 4 digit hex colour (see CSS Level 4 spec*)
Browser support as of Sept 2018
- Firefox has supported this syntax since Firefox 49 (Mozilla bug 567283).
- Safari has supported this syntax since Safari 10.
- Chrome has supported this syntax since Chrome 62. For earlier versions you could enable experimental web features to use this syntax. See Chromium Issue 618472 and Webkit bug 150853.
- Android Apps that target Android P or newer can use this syntax
- Opera supports this syntax in Opera 52 (or Opera 39 when experimental web features are enabled).
- IE 11 and EdgeHTML 17 (Edge 42) do not support this syntax.
Up to date browser support information is available on CanIUse.com
*Technically still in draft, but given the browser support this is unlikely to be changed.
In CSS 3, to quote from the spec, "there is no hexadecimal notation for an RGBA value" (see CSS Level 3 spec). Instead you can the use rgba() functional notation with decimals or percentages, e.g. rgba(255, 0, 0, 0.5) would be 50% transparent red. RGB channels are 0-255 or 0%-100%, alpha is 0-1.
In CSS 4*, you can specify the alpha channel using the 7th and 8th characters of an 8 digit hex colour, or 4th character of a 4 digit hex colour (see CSS Level 4 spec*)
Browser support as of Sept 2018
- Firefox has supported this syntax since Firefox 49 (Mozilla bug 567283).
- Safari has supported this syntax since Safari 10.
- Chrome has supported this syntax since Chrome 62. For earlier versions you could enable experimental web features to use this syntax. See Chromium Issue 618472 and Webkit bug 150853.
- Android Apps that target Android P or newer can use this syntax
- Opera supports this syntax in Opera 52 (or Opera 39 when experimental web features are enabled).
- IE 11 and EdgeHTML 17 (Edge 42) do not support this syntax.
Up to date browser support information is available on CanIUse.com
*Technically still in draft, but given the browser support this is unlikely to be changed.
edited Sep 12 '18 at 8:56
answered Jun 24 '15 at 14:51
thelemthelem
1,5641527
1,5641527
2
As of now, Mozilla (Firefox 49) appears to support #RRGGBBAA and #RGBA
– Shiyaz
Oct 14 '16 at 14:06
For current browser support info, see caniuse.com/#feat=css-rrggbbaa
– Stony
Nov 25 '17 at 22:44
add a comment |
2
As of now, Mozilla (Firefox 49) appears to support #RRGGBBAA and #RGBA
– Shiyaz
Oct 14 '16 at 14:06
For current browser support info, see caniuse.com/#feat=css-rrggbbaa
– Stony
Nov 25 '17 at 22:44
2
2
As of now, Mozilla (Firefox 49) appears to support #RRGGBBAA and #RGBA
– Shiyaz
Oct 14 '16 at 14:06
As of now, Mozilla (Firefox 49) appears to support #RRGGBBAA and #RGBA
– Shiyaz
Oct 14 '16 at 14:06
For current browser support info, see caniuse.com/#feat=css-rrggbbaa
– Stony
Nov 25 '17 at 22:44
For current browser support info, see caniuse.com/#feat=css-rrggbbaa
– Stony
Nov 25 '17 at 22:44
add a comment |
It looks like there is no hex alpha format: http://www.w3.org/TR/css3-color/
Anyway, if you use a CSS preprocessor like SASS then you can pass an hex to rgba
:
background:
rgba(#000, 0.5);
And the preprocessor just converts the hex code to rgb automatically.
4
Very cool. Thanks for mentioning!
– AndrewHenderson
Apr 26 '13 at 0:56
add a comment |
It looks like there is no hex alpha format: http://www.w3.org/TR/css3-color/
Anyway, if you use a CSS preprocessor like SASS then you can pass an hex to rgba
:
background:
rgba(#000, 0.5);
And the preprocessor just converts the hex code to rgb automatically.
4
Very cool. Thanks for mentioning!
– AndrewHenderson
Apr 26 '13 at 0:56
add a comment |
It looks like there is no hex alpha format: http://www.w3.org/TR/css3-color/
Anyway, if you use a CSS preprocessor like SASS then you can pass an hex to rgba
:
background:
rgba(#000, 0.5);
And the preprocessor just converts the hex code to rgb automatically.
It looks like there is no hex alpha format: http://www.w3.org/TR/css3-color/
Anyway, if you use a CSS preprocessor like SASS then you can pass an hex to rgba
:
background:
rgba(#000, 0.5);
And the preprocessor just converts the hex code to rgb automatically.
edited Nov 7 '12 at 9:07
Mischa
38.6k885101
38.6k885101
answered Nov 7 '12 at 8:48
guitarranalonguitarranalon
795152
795152
4
Very cool. Thanks for mentioning!
– AndrewHenderson
Apr 26 '13 at 0:56
add a comment |
4
Very cool. Thanks for mentioning!
– AndrewHenderson
Apr 26 '13 at 0:56
4
4
Very cool. Thanks for mentioning!
– AndrewHenderson
Apr 26 '13 at 0:56
Very cool. Thanks for mentioning!
– AndrewHenderson
Apr 26 '13 at 0:56
add a comment |
I'm not sure if there is an official standard-
RGBA is the representation I've seen for Web
Macromedia and others use ARGB
I believe that RGBA is the more common representation.
If it helps this is from W3 for CSS3
http://www.w3.org/TR/css3-color/#rgba-color
EDIT (Patrick): quote from the above W3 link
Unlike RGB values, there is no hexadecimal notation for an RGBA value
2
Also, the CSS function for specifying colors with alphas is rgba()
– Amber
Sep 14 '09 at 2:51
8
from the W3 link you posted: Unlike RGB values, there is no hexadecimal notation for an RGBA value.
– Patrick Klug
Sep 14 '09 at 4:18
2
I've seen #RGB,A before. Weird.
– Joshua
Oct 3 '11 at 20:19
For Android drawables, it appears to be ARGB: developer.android.com/reference/android/graphics/drawable/…
– Derek Kurth
Sep 27 '12 at 16:56
add a comment |
I'm not sure if there is an official standard-
RGBA is the representation I've seen for Web
Macromedia and others use ARGB
I believe that RGBA is the more common representation.
If it helps this is from W3 for CSS3
http://www.w3.org/TR/css3-color/#rgba-color
EDIT (Patrick): quote from the above W3 link
Unlike RGB values, there is no hexadecimal notation for an RGBA value
2
Also, the CSS function for specifying colors with alphas is rgba()
– Amber
Sep 14 '09 at 2:51
8
from the W3 link you posted: Unlike RGB values, there is no hexadecimal notation for an RGBA value.
– Patrick Klug
Sep 14 '09 at 4:18
2
I've seen #RGB,A before. Weird.
– Joshua
Oct 3 '11 at 20:19
For Android drawables, it appears to be ARGB: developer.android.com/reference/android/graphics/drawable/…
– Derek Kurth
Sep 27 '12 at 16:56
add a comment |
I'm not sure if there is an official standard-
RGBA is the representation I've seen for Web
Macromedia and others use ARGB
I believe that RGBA is the more common representation.
If it helps this is from W3 for CSS3
http://www.w3.org/TR/css3-color/#rgba-color
EDIT (Patrick): quote from the above W3 link
Unlike RGB values, there is no hexadecimal notation for an RGBA value
I'm not sure if there is an official standard-
RGBA is the representation I've seen for Web
Macromedia and others use ARGB
I believe that RGBA is the more common representation.
If it helps this is from W3 for CSS3
http://www.w3.org/TR/css3-color/#rgba-color
EDIT (Patrick): quote from the above W3 link
Unlike RGB values, there is no hexadecimal notation for an RGBA value
edited Oct 8 '12 at 23:22
Patrick Klug
9,185961104
9,185961104
answered Sep 14 '09 at 2:36
Kelly GendronKelly Gendron
5,78453562
5,78453562
2
Also, the CSS function for specifying colors with alphas is rgba()
– Amber
Sep 14 '09 at 2:51
8
from the W3 link you posted: Unlike RGB values, there is no hexadecimal notation for an RGBA value.
– Patrick Klug
Sep 14 '09 at 4:18
2
I've seen #RGB,A before. Weird.
– Joshua
Oct 3 '11 at 20:19
For Android drawables, it appears to be ARGB: developer.android.com/reference/android/graphics/drawable/…
– Derek Kurth
Sep 27 '12 at 16:56
add a comment |
2
Also, the CSS function for specifying colors with alphas is rgba()
– Amber
Sep 14 '09 at 2:51
8
from the W3 link you posted: Unlike RGB values, there is no hexadecimal notation for an RGBA value.
– Patrick Klug
Sep 14 '09 at 4:18
2
I've seen #RGB,A before. Weird.
– Joshua
Oct 3 '11 at 20:19
For Android drawables, it appears to be ARGB: developer.android.com/reference/android/graphics/drawable/…
– Derek Kurth
Sep 27 '12 at 16:56
2
2
Also, the CSS function for specifying colors with alphas is rgba()
– Amber
Sep 14 '09 at 2:51
Also, the CSS function for specifying colors with alphas is rgba()
– Amber
Sep 14 '09 at 2:51
8
8
from the W3 link you posted: Unlike RGB values, there is no hexadecimal notation for an RGBA value.
– Patrick Klug
Sep 14 '09 at 4:18
from the W3 link you posted: Unlike RGB values, there is no hexadecimal notation for an RGBA value.
– Patrick Klug
Sep 14 '09 at 4:18
2
2
I've seen #RGB,A before. Weird.
– Joshua
Oct 3 '11 at 20:19
I've seen #RGB,A before. Weird.
– Joshua
Oct 3 '11 at 20:19
For Android drawables, it appears to be ARGB: developer.android.com/reference/android/graphics/drawable/…
– Derek Kurth
Sep 27 '12 at 16:56
For Android drawables, it appears to be ARGB: developer.android.com/reference/android/graphics/drawable/…
– Derek Kurth
Sep 27 '12 at 16:56
add a comment |
Chrome 52+ supports alpha hex:
background: #56ff0077;
For older browsers, you'll have to use:
background-color: rgba(255, 220, 0, 0.3);
2
No it doesn't, unless you enable experimental web features, because it was causing problems on Android. See my answer above for browser support details.
– thelem
Feb 27 '17 at 17:26
add a comment |
Chrome 52+ supports alpha hex:
background: #56ff0077;
For older browsers, you'll have to use:
background-color: rgba(255, 220, 0, 0.3);
2
No it doesn't, unless you enable experimental web features, because it was causing problems on Android. See my answer above for browser support details.
– thelem
Feb 27 '17 at 17:26
add a comment |
Chrome 52+ supports alpha hex:
background: #56ff0077;
For older browsers, you'll have to use:
background-color: rgba(255, 220, 0, 0.3);
Chrome 52+ supports alpha hex:
background: #56ff0077;
For older browsers, you'll have to use:
background-color: rgba(255, 220, 0, 0.3);
edited Jul 21 '16 at 7:00
answered Jul 17 '16 at 13:06
Oded BreinerOded Breiner
19.2k77258
19.2k77258
2
No it doesn't, unless you enable experimental web features, because it was causing problems on Android. See my answer above for browser support details.
– thelem
Feb 27 '17 at 17:26
add a comment |
2
No it doesn't, unless you enable experimental web features, because it was causing problems on Android. See my answer above for browser support details.
– thelem
Feb 27 '17 at 17:26
2
2
No it doesn't, unless you enable experimental web features, because it was causing problems on Android. See my answer above for browser support details.
– thelem
Feb 27 '17 at 17:26
No it doesn't, unless you enable experimental web features, because it was causing problems on Android. See my answer above for browser support details.
– thelem
Feb 27 '17 at 17:26
add a comment |
You could try putting the hex color into the color picker of GIMP or photo shop to get the RGB value and then using the alpha value. eg. red is #FF0000
or rgb(255,0,0
) if you want red with an alpha value of .5 then rgba(255,0,0,.5)
.
Maybe not exactly what you wanted but hopefully helps.
1
This was voted down, which seems a bit harsh. It doesn't answer the question asked, but the question doesn't say why they want to know. If they just want to use an RGBA colour in CSS, then this answer is correct.
– thelem
Jun 24 '15 at 14:37
add a comment |
You could try putting the hex color into the color picker of GIMP or photo shop to get the RGB value and then using the alpha value. eg. red is #FF0000
or rgb(255,0,0
) if you want red with an alpha value of .5 then rgba(255,0,0,.5)
.
Maybe not exactly what you wanted but hopefully helps.
1
This was voted down, which seems a bit harsh. It doesn't answer the question asked, but the question doesn't say why they want to know. If they just want to use an RGBA colour in CSS, then this answer is correct.
– thelem
Jun 24 '15 at 14:37
add a comment |
You could try putting the hex color into the color picker of GIMP or photo shop to get the RGB value and then using the alpha value. eg. red is #FF0000
or rgb(255,0,0
) if you want red with an alpha value of .5 then rgba(255,0,0,.5)
.
Maybe not exactly what you wanted but hopefully helps.
You could try putting the hex color into the color picker of GIMP or photo shop to get the RGB value and then using the alpha value. eg. red is #FF0000
or rgb(255,0,0
) if you want red with an alpha value of .5 then rgba(255,0,0,.5)
.
Maybe not exactly what you wanted but hopefully helps.
answered Aug 6 '13 at 18:59
JinjubeiJinjubei
19810
19810
1
This was voted down, which seems a bit harsh. It doesn't answer the question asked, but the question doesn't say why they want to know. If they just want to use an RGBA colour in CSS, then this answer is correct.
– thelem
Jun 24 '15 at 14:37
add a comment |
1
This was voted down, which seems a bit harsh. It doesn't answer the question asked, but the question doesn't say why they want to know. If they just want to use an RGBA colour in CSS, then this answer is correct.
– thelem
Jun 24 '15 at 14:37
1
1
This was voted down, which seems a bit harsh. It doesn't answer the question asked, but the question doesn't say why they want to know. If they just want to use an RGBA colour in CSS, then this answer is correct.
– thelem
Jun 24 '15 at 14:37
This was voted down, which seems a bit harsh. It doesn't answer the question asked, but the question doesn't say why they want to know. If they just want to use an RGBA colour in CSS, then this answer is correct.
– thelem
Jun 24 '15 at 14:37
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f1419448%2fhex-representation-of-a-color-with-alpha-channel%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
5
It's coming in CSS Color Level 4 source (see fourth bullet point)
– Šime Vidas
May 6 '13 at 12:37
@ŠimeVidas if you had put that in an answer, I'd have upvoted you.
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 13 '14 at 11:56
@cirosantilli Do I look like I need the rep?
:-P
– Šime Vidas
Feb 14 '14 at 0:56
1
@ŠimeVidas lol, if you care to share some then... =)
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Feb 14 '14 at 7:55
There's a similar CSS-specific question about this here: CSS hexidecimal RGBA?
– James Donnelly
Jan 6 '16 at 15:29