How to contrast the cursor with the background?

For the browsers I tried (Chrome, Firefox, and IE), the built-in crosshair cursor changes to white when it is above the black image and black when it is above the white image. Is there a way to make custom cursors that do this?

Here is a violin to understand what I mean.

Thanks a lot!

+4
source share
1 answer

The CUR file format is explained in more detail here . In particular, it mentions the following:

A monochrome (1 bit) icon or cursor will contain only four possible pixel values: black, white, transparent and inverted. A transparent or inverted pixel can be black or white. The color palette will contain only two colors: black (initial zero) and white (input). Transparent color is the original color of the display pixels. Inverted is the inverse color of the displayed pixels.

+6
source

Source: https://habr.com/ru/post/1398331/


All Articles