For what it's worth, the only Hindu divinities that are depicted with any frequency with blue skin are Lord Vishnu and his avatars. Other divinities, like Lord Shiva, sometimes are also portrayed as blue in popular art, but this seems to be an artistic choice that isn't universal.
Lord Vishnu is described in the scriptural texts as "megha varna", or the color of fresh rain clouds, which doesn't really align with a primary color. Depending on the region and tradition, this has usually been traditionally rendered as black or a dark grey, especially when dealing with carving and creating images for worship. The most common material used for image making was granite, which ranges in color across various shades of grey, and when polished can be almost jet black.
There is an apocryphal story that suggests that the medieval trend to portray Lord Vishnu and his avatars as blue dates to a decision by the Mughal emperor Akbar. The story suggests that artists were conflicted in how to interpret "megha varna" and the emperor decided in favor of blue. In Mughal miniatures, the avatars like Krishna are indeed mostly blue, and likely strongly influenced later popular religious depictions of divinities in general. As a consequence, divinities like the Goddess Kali (described as pitch black) are popularly portrayed in art as a deep blue.