Class IdentiColorHelper


  • public class IdentiColorHelper
    extends Object
    /c1 color of top left corner /c2 color of top right corner /c3 color of bottom left corner /c4 color of central image ....../----c1----------------\ /----c2----------------\ /----c3----------------\ /-C1-\ /-C2-\ /-C3-\ /-C4-\ ....../q\/q\/q\/q\/q\/q\/q\/q\ |/q\/q\/q\/q\/q\/q\/q\/q\ |/q\/q\/q\/q\/q\/q\/q\/q\| | a5907fa2fc0fcb336d648805be46da11ab850e5c44934279c921a855ed50825a9ba7e13e893934a2c5ba14d82a08ccdf
    Author:
    giovanni.antino@h2tcoin.com
    • Constructor Detail

      • IdentiColorHelper

        public IdentiColorHelper()
    • Method Detail

      • cfh

        public static int cfh​(String cc)
        channel from hex
        Parameters:
        cc - channel in hex "ff"
        Returns:
        channel in int ff evaluate to 255
      • fgColorFromHex

        public static Color fgColorFromHex​(String hex)
      • bgColorFromHex

        public static Color bgColorFromHex​(String hex)
      • getRotation

        public static int[] getRotation​(String hex)
      • clone

        public static int[][] clone​(int[][] matrix)
      • mirrorVertical

        public static int[][] mirrorVertical​(int[][] matrix)
      • mirrorHorizontal

        public static int[][] mirrorHorizontal​(int[][] matrix)
      • mirrorHplusV

        public static int[][] mirrorHplusV​(int[][] matrix)
      • get32by32SquareBlock

        public static int[][] get32by32SquareBlock​(String hex)
        Parameters:
        hex - 3 char hex string
        Returns:
        32x32 mirrored matrix
      • get64by64SquareBlockSIM

        public static int[][] get64by64SquareBlockSIM​(String hex)
        Parameters:
        hex -
        Returns:
      • get64by64SquareBlockHIRND

        public static int[][] get64by64SquareBlockHIRND​(String hex)
        Parameters:
        hex - 12 char
        Returns:
      • get128by128SquareBlockHIRND

        public static int[][] get128by128SquareBlockHIRND​(String hex)
        Parameters:
        hex - 12 char
        Returns:
      • get256by256SquareBlockHIRND

        public static int[][] get256by256SquareBlockHIRND​(String hex)
        Parameters:
        hex - 60 char hex
        Returns:
      • merge4Square

        public static int[][] merge4Square​(int[][] topLeft,
                                           int[][] topRight,
                                           int[][] bottomRight,
                                           int[][] bottomLeft)
      • getIdenticon256

        public static Color[][] getIdenticon256​(String hex)
      • getAvatarByString128Icon

        public static Icon getAvatarByString128Icon​(String value)
      • getAvatarByString256Icon

        public static Icon getAvatarByString256Icon​(String value)
      • getAvatarBase64URL256

        public static String getAvatarBase64URL256​(String value)
        Parameters:
        value - address qtesla or ed
        Returns:
        256*256 identicon base64url png
      • getRawAvatar256

        public static String getRawAvatar256​(String value)
      • pixelToColorSquareMatrix

        public static Color[][] pixelToColorSquareMatrix​(Color fg,
                                                         Color bg,
                                                         int[][] m)
      • createIdentiMatrix

        public static void createIdentiMatrix​(String hex)
      • main

        public static void main​(String[] args)
      • printMatrix

        public static void printMatrix​(int[][] m)