Giter Site home page Giter Site logo

string_to_hex's Introduction

string_to_hex pub package

A powerful conversion of [String] or/and Hash to HEX. It returns a unique HEX, or a unique int of [Color()] per provided String/hash. It's provided two methods [toHexString] and [toColor], which return a Hex-String, or integer of Color() respectively.

Default:

This package return hex-string or hex-int-color, check bellow:

toColor()

Return a [int] of 'bit hex': Its return is proper to use as hex [color int] in a Color() For example: ... color: Color(StringToHex.toColor('a nice String')) ... then it'll generate and fill a hex-color int in it.

return a hex-color.
i.e: 0xFF353535
or: 8787451701
how to:

you can use as:

  var myNiceColor = StringToHex.toColor('your nice string');
    ...
    color: Color(myNiceColor);
    ...

or:

...
color: Color(StringToHex.toColor('your nice string'));
...

toHexString()

Return a [String] of 'bit hex': Its return is proper to your custom manipulating (as you lik better ๐Ÿง‘โ€๐Ÿ’ป).

Returns a String HEX with prefix '0xFF'
i.e: '0xFF343434'

Example:

This example app shows all implementations

App shot

App Shots

Have a Nice Code!

string_to_hex's People

Contributors

allansrc avatar sharpsan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.