I cannot find a way to have different borders on a cell with the excellent caxlsx gem on ruby.
From the doc, the expected style for borders is defined using (for instance):
{style: :thick, color: 'FF0000', edges:[:left,:right]}
So, it seems imposible to have a red thick border on the left, and a blue dash border on the right for instance.
Am i wrong?
Related
When you double click on text, it highlights the current text and then places a thin blue border around repeated text. I want to make this thin blue border thicker and change it to white for easier visibility. Can this be configured? Thank you.
The highlighting you are referring to is controlled by the match_selection preference. I'm just mentioning this here in case it helps others find this Q/A pair in future.
It seems that the color for this is controlled by the caret color in your color scheme. However, it seems that there is no way to change the color without changing the color of the caret, or make the border thicker. There is an open feature request for the latter here: https://github.com/SublimeTextIssues/Core/issues/453
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.
I hI have a website that runs several colour themes. I want to change the text select colour based on the colour theme.
p::selection,
li::selection,
div::selection{
background-color: #hex;
color: #ffffff;
}
I'm also using the -moz and -o prefixes.
For the colour theme where I'm using #274569 the default colour of #339aff is acceptable and I've calculated the contrast. What I want to do is work out how to calculate the colour from another (#148545 for example) if I have the contrast.
There is no shortage of resources to the web to calculate the contrast of two colours but I'm after doing it the other way round, unless there a better way of choosing the colour.
Is there a way to do this?
I am trying to give some border to my cross text which around 45 degree in excel but issue is that whenever i apply border to cross text the border also get apply at 45 degree.
I am looking for a straight rectangle border which contains cross text in it in excel.
Please help me to do that
I dont think you can find a way around that, but you could improvise;
try removing all the borders on that particular cell then sort of draw a rectangle (Or similar shape) and set its fill to nothing so it can give this impression of a "straight border" and this will look good, if you format it well that is, on printed paper.
Or you can draw a textbox on top of the cell (with the same size) and remove any color fill
If there's an option of locking its position, it would be useful too
I have these four icons that look like this:
But I want to be able to just have 1 gray icon and then tint them different colors by setting the color in XNA / Monogames Draw function.
I took one of the images and pulled all the colour out and made it a bit lighter it to get
I also tried a version where the center of the gray image is fully white but neither look right in the game, here's an image with the icons on top and my tinted gray on the bottom (the tint color is sampled from the center of the original icons):
I figure there should be a way, given the original icons, to figure out how to make the gray icon and also the colors to plug into the draw function so that I get an exact copy of the original. I assume this is possible? How do you do it?
EDIT:
To elaborate on my issue here is another image all with blue icons, the top images are all the original blue icon for comparison. The bottom images are all grey icons I used to tint to make the middle icons. The grey icons are, from left to right, 0 saturation, 0 saturation and 100 brightness, and auto level + 0 saturation. It seems to me that by setting the saturation to 0 I am losing the ability to make the icon look right as it's not just "darker" blue but also "bluer" blue.
EDIT 2: I don't think it's possible, thanks for the help Goose.
Would it work if the grey icon was full white at the center (it's brightest point) and got darker from there.
Then you could just sample the color at the center of your source image (the colored ones) and tint with that.
I think the issue you are seeing now is that the grey image will darken the color you are tinting with, so you actually want to tint with the source color PLUS the amount of grey at the brightest point in the image (if that makes sense).