how to create buy/sell Alert Conditions for specific Hex color codes when is displayed on screen? - colors

I'm using Ema crossover fill area generating new hex color.
I just want a buy alert signal when specific (hex color) is displayed on screen. Sell alert signal when specific (hex color) is displayed on screen.

Related

How to reduce the displayed Majorgridlines in order to match them to the "Category" texts?

Within this picture, an Excel chart is displaying approximately 100 values + times (red curve):
Excel is "intelligent enough" to reduce the number of the displayed "Category" date+time texts (here: by the factor 6) because otherwise the texts would overlap each other. But the Excel chart still displays ALL the vertical (dark gray) grid lines where my value table contains time markers.
IF my data table contains even more (e.g. 1000) time values, then the displayed "Category" date+time texts are automatically reduced e.g. by the factor 60. But then the chart background is completely covered by vertical grid lines and does not show its background color any more at all.
In fact I would like to keep/show only those vertical grid lines where a Category (time) text is shown, i.e. ONLY at my green lines.
So how to to reduce the number of the displayed vertical grid lines ?
Thanks a lot

Colour isolation

I'm fairly new to GIMP
I have some black-and-white images in RGB mode. I want to highlight some areas in plain Red (ie, zero Blue+Green), some in plain Blue (ie, zero Red+Green), and the rest in plain Green (ie, zero Red+Blue)
I will be selecting several areas using Paths, though a simple rectangle would be fine for now
The final image will be Green, with 2+ selections of Red, and 2+ selections of Blue
I have experimented with multiple layers & multiple images, but I always get problems with the selection areas
Thanks in advance !
If what you want is keep the value of the R (or G or B) channel in the selection, while setting the other two components to 0:
Create a layer group above your image layer
Add a transparent layer in the group, name it "Green", bucket-fill with green
Add a transparent layer in the group, above "Green", name it "Red+Blue"
Set the group to "Multiply" mode. You should see your image in green.
To add red/blue, make a selection, make sure "Red+Blue" is the active layer, and bucket fill the selection with Red or Blue.
Notes
With some selection tools, (path, ellipse...) you may have to use Select>Sharpen before the bucket-fill to make sure that there are no partially selected pixels
To see the original image when making selections, just make the group invisible.
You can also use two separate layers for Red and Blue (both above the Green one, in the layer group)
If what you want is just areas of #FF0000 and #0000FF over a #00FF00 background, then just hide the initial image layer when exporting.

How to implement a color contrast enriching algorithm? [duplicate]

This question already has answers here:
Determine font color based on background color
(22 answers)
Closed 2 years ago.
I am currently developing an App. In this App I get some RGB color code from the server, that I want to display.
As the color I get should be the background color of a Label, there is some text, that should be displayed above it. The user defining the color is completely free in choosing a color, so I am in need of finding an algorithm, where the text color of the label is somehow contrasted to the color I get from the webservice.
Problem explained in an example:
I choose black 0x000000 to be the textcolor. If the user defines a color like dark gray 0x111111, the text's visibility would be very bad.
In addition, I want the text color to be black or white in order to not over-color the app.
So how can I determine, if white or black is the better color for the textcolor, based on a RGB code I get from the server?
You just should calculate contrast ratio for user color with black and white, then choose the color with higher ratio.
Here is description for calculating relative color contrast from RGB.
Note that relative luminance of white is 1.0 and for black is 0.0, so (if you are considering only black and white) you can just check if relative luminance of user color is <0.5 then use white, and use black otherwise.

Is it possible to scale a text to a certain width by changing font attributes?

Let me add an image to describe my question.
http://i.stack.imgur.com/SisN7.jpg
My facebook name is located at the top-left. It has 9 characters and it is centered on the dark gray block.
Right now, if my name was just "D", it would appear on the place where "D" letter is located. Alternatively, if my nickname was something like "IHaveAVeryLongUsernameWoah", it would overflow to pink area.
Is there any auto-scaling feature on FabricJS, so I can simply define the max-width, and FabricJS calculates font size automatically?
Like, if there is a single letter, print it at the center. If there are alot of letters and letter width exceeds maximum size, then lower font size.
Not sure if this is doable. Any help would be appreciated.

Change pixels color [duplicate]

I have more then 1 week reading about selective color change of an image. It meand selcting a color from a color picker and then select a part of image in which I want to change the color and apply the changing of color form original color to color of color picker.
E.g. if I select a blue color in color picker and I also select a red part in the image I should be able to change red color to blue color in all the image.
Another example. If I have an image with red apples and oranges and if I select an apple on the image and a blue color in the color picket, then all apples should be changing the color from red to blue.
I have some ideas but of course I need something more concrete on how to do this
Thank you for reading
As a starting point, consider clustering the colors of your image. If you don't know how many clusters you want, then you will need methods to determine whether to merge or not two given clusters. For the moment, let us suppose that we know that number. For example, given the following image at left, I mapped its colors to 3 clusters, which have the mean colors as shown in the middle, and representing each cluster by its mean color gives the figure at right.
With the output at right, now what you need is a method to replace colors. Suppose the user clicks (a single point) somewhere in your image, then you know the positions in the original image that you will need to modify. For the next image, the user (me) clicked on a point that is contained by the "orange" cluster. Then he clicked on some blue hue. From that, you make a mask representing the points in the "orange" cluster and play with that. I considered a simple gaussian filter followed by a flat dilation 3x5. Then you replace the hues in the original image according to the produced mask (after the low pass filtering, the values on it are also considered as a alpha value for compositing the images).
Not perfect at all, but you could have a better clustering than me and also a much-less-primitive color replacement method. I intentionally skipped the details about clustering method, color space, and others, because I used only basic k-means on RGB without any pre-processing of the input. So you can consider the results above as a baseline for anything else you can do.
Given the image, a selected color, and a target new color - you can't do much that isn't ugly. You also need a range, some amount of variation in color, so you can say one pixel's color is "close enough" while another is clearly "different".
First step of processing: You create a mask image, which is grayscale and varying from 0.0 to 1.0 (or from zero to some maximum value we'll treat as 1.0), and the same size as the input image. For each input pixel, test if its color is sufficiently near the selected color. If it's "the same" or "close enough" put 1.0 in the mask. If it's different, put 0.0. If is sorta borderline, put an in-between value. Exactly how to do this depends on the details of the image.
This might work best in LAB space, and testing for sameness according to the angle of the A,B coordinates relative to their origin.
Once you have the mask, put it aside. Now color-transform the whole image. This might be best done in HSV space. Don't touch the V channel. Add a constant to S, modulo 360deg (or mod 256, if S is stored as bytes) and multiply S by a constant chosen so that the coordinates in HSV corresponding to the selected color is moved to the HSV coordinates for the target color. Convert the transformed S and H, with the unchanged L, back to RGB.
Finally, use the mask to blend the original image with the color-transformed one. Apply this to each channel - red, green, blue:
output = (1-mask)*original + mask*transformed
If you're doing it all in byte arrays, 0 is 0.0 and 255 is 1.0, and be careful of overflow and signed/unsigned problems.

Resources