rgba

RGBa in Internet Explorer

耗尽温柔 提交于 2019-12-04 10:57:27
I know that IE does not support RGBa. I also know that you can use the follow methods: /* For IE 5.5 - 7*/ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); /* For IE 8*/ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; The first two Numbers in the "Colorstr" is the value for the opacity. with 99 being a .6 opacity. For other levels of opacity what are the number values? I cannot find them. Is there a simple way to calculate the number for opacity? Or where can I find those values? Thanks

Android Renderscript - Rotate YUV data in Renderscript

走远了吗. 提交于 2019-12-04 05:33:44
问题 Based on the discussion I had at Camera2 api Imageformat.yuv_420_888 results on rotated image, I wanted to know how to adjust the lookup done via rsGetElementAt_uchar methods so that the YUV data is rotated by 90 degree. I also have a project like the HdrViewfinder provided by Google. The problem is that the output is in landscape because the output surface used as target surface is connected to the yuv allocation which does not care if the device is in landscape or portrait mode. But I want

Alpha Blending 2 RGBA colors in C [duplicate]

主宰稳场 提交于 2019-12-03 17:45:58
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to do alpha blend fast? What is the fastest way to alpha blend 2 RGBA (Integer) colors? As a note, the target color where to blend is always opaque, only the second color can have different levels of transparency. I am trying to find the fastest way in C, taking into account that the final resulting color from the blend must end up with no transparency, fully opaque (alpha = 0xff) 回答1: int blend(unsigned

CSS equivalent for Text Tint

ε祈祈猫儿з 提交于 2019-12-03 17:20:42
I'm trying to export files from Adobe InDesign to basic HTML + CSS. A user can select some text and change the text colour. Using the InDesign SDK I can fetch the RGB values for that colour and in the CSS file declare color: rgb(R,G,B) which works perfectly fine. You can also change the text tint value. Upto now I was just taking the tint value, converting it to the range 0-1 and in the CSS putting an entry as color: rgba(R,G,B,Tint) During testing I realized that tint = 0 should actually mean white text, but it didn't show on the HTML because A (in RGBA) = 0 means transparent!!! Anyone knows

rawvideo and rgb32 values passed to FFmpeg

佐手、 提交于 2019-12-03 11:36:32
I'm converting a file to PNG format using this call: ffmpeg.exe -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s <width>x<height> -i infile -f image2 -vcodec png out.png I want to use a converter that can be linked or compiled into a closed-source commercial product, unlike FFmpeg , so I need to understand the format of the input file I'm passing in. So, what does rawvideo mean to FFmpeg ? Is FFmpeg determining what type of raw format the input file has, or does rawvideo denote something distinct? What does rgb32 mean here? The size of the input file is a little more than (width *

Why do browsers render rgba differently on OSX?

扶醉桌前 提交于 2019-12-03 08:25:58
I was trying to code up some color manipulation code and was stuck for a long time with alpha, then I (2 hours later) realized browsers render rgba differently. I created this test: http://jsbin.com/adekez/2/ add /edit to look at the code Here are the results in 4 browsers in OSX Lion: http://imgur.com/g2iqu That is an element with a background of rgba(0,0,0,0.5) on top of white. My hex calculator says: FF÷2 = 7F.8 which means Safari at #808080 is correct Firefox at #7F7F7F is off by 1 Opera at #7E7E7E is off by 2 Chrome at #929292 is way off What's going here, is this a bug in Chrome or do I

CSS: lighten an element on hover

蹲街弑〆低调 提交于 2019-12-03 04:44:00
问题 Assuming an element is at 100% saturation, opacity, etc... how can I have its background become slightly lighter when it is hovered? The use case is that I'm allowing a user to hover over any element on a page. I don't want to go around determining each colors equivalent at 80% opacity. One method is to change the opacity: 0.4 but I only want the background to change. 回答1: It's a long time ago but you can do something like this: .element { background-color: red; } .element:hover { box-shadow:

LESScss converting rgba to hex? how to nest color variables into a mixin?

怎甘沉沦 提交于 2019-12-03 03:15:40
问题 Does LESScss convert all rgba colors to hex values? I am trying to create a mixin, say, .color, that allows you to pass in a color variable previously defined, and I want it to be in rgba. this doesn't work, but here's the idea: .bgcolor(@colorvariable,@alpha) { background-color: @colorvariable + rgba(0, 0, 0, @alpha); } Where @colorvariable would be, @blue: rgb(17,55,76); or @green: rgb(125,188,83); etc. I want to define a bunch of these variables, and then be able to pass them in to

Sass - Converting Hex to RGBa for background opacity

好久不见. 提交于 2019-12-03 01:34:23
问题 I have the following Sass mixin, which is a half complete modification of an RGBa example : @mixin background-opacity($color, $opacity: .3) { background: rgb(200, 54, 54); /* The Fallback */ background: rgba(200, 54, 54, $opacity); } I have applied $opacity ok, but now I am a stuck with the $color part. The colors I will be sending into the mixin will be HEX not RGB. My example use will be: element { @include background-opacity(#333, .5); } How can I use HEX values within this mixin? 回答1: The

Java: Get the RGBA from a Buffered Image as an Array of Integer

…衆ロ難τιáo~ 提交于 2019-12-02 20:15:52
问题 Given an image file, say of PNG format, how to I get an array of int [r,g,b,a] representing the pixel located at row i, column j? So far I am starting here: private static int[][][] getPixels(BufferedImage image) { final byte[] pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData(); final int width = image.getWidth(); final int height = image.getHeight(); int[][][] result = new int[height][width][4]; // SOLUTION GOES HERE.... } Thanks in advance! 回答1: You need to get the