GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - angular-rust/ux-primitives: UX Primitives is a core graphic and color abstraction for Angular Rust

BranchesTags
Open more actions menu

Latest commit

 

History

86 Commits
86 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
src
src
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
CONTRIBUTORS.md
CONTRIBUTORS.md
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
css.md
css.md
 
 

Repository files navigation

UX Primitives

API Docs Crates.io Code coverage Tests MPL-2.0 licensed Gitter chat loc

UX Primitives is a powerful library for working with color and graphics. It is one of the main building blocks of the Angular Rust framework. This library is well organized and easy to use.

The library provides the basic building blocks for creating games and regular applications. It contains behavior definitions for game applications and basic structures.

The basic fundamental entity for graphical applications such as games is color. This library contains sufficient functionality for working with color, including storage, processing and conversion between different color spaces.

It also provides support for multiple color schemes and contains the OpenColor palette for the convenience and higher quality of your applications.

Quick Start

Add UX primitives to your project using Cargo-edit or by editing the Cargo.toml file:

cargo add ux-primitives

Basic usage

use primitives::prelude::*;

use primitives::foundation::{colorschemes::Tetrad, colorspace::HslColor};

fn main() {
    // Get Palette Color
    let base = color::TEAL_9;

    println!("Base color {}", base.to_hex_string());

    println!("Lighten {}", base.lighten(10.0).to_hex_string());

    println!("Darken {}", base.darken(10.0).to_hex_string());

    println!("Hue Adjusted {}", base.adjust_hue(90.).to_hex_string());

    println!("Complement {}", base.complement().to_hex_string());

    println!("Inverted {}", base.invert().to_hex_string());

    println!("Saturated {}", base.saturate(50.).to_hex_string());

    println!("Desaturated {}", base.desaturate(50.).to_hex_string());

    println!("Grayscale {}", base.grayscale().to_hex_string());

    let hsl: HslColor = base.into();

    println!("{} {}", base, hsl);

    // Generate color scheme
    let scheme = Tetrad::new(base);
    // You can adjust color scheme parameters before get colors
    println!();

    for idx in 0..scheme.num_of_colors() {
        match scheme.get_color(idx) {
            Some(col) => println!("Color: {}", col.to_hex_string()),
            None => println!("No color")
        }
    }
}

Features

  • Graphic abstraction for native and web canvas implemented in UX Animate
  • The most commonly used color spaces: RGB, RGBA, HSL, HSV, LAB, CMY, CMYK.
  • Color conversion: RGB to HSL, etc.
  • Support for color quantization to bring the color closer to the palette.
  • Palette Open Color (4.5 thousand stars)
  • Generation of color scheme according to color theory.
  • Basic traits for interactive applications (WIP).

Color scheme for UI design

UX Primitives contain powerfull palette for easy of use and more professional look for your applications. UX Primitives use the Open Color scheme optimized for UI like font, background, border, etc.

  • All colors shall have adequate use
  • Provide general color for UI design
  • All colors will be beautiful in itself and harmonious
  • At the same brightness level, the perceived brightness will be constant

Learn More

  • Manual, Docs, etc
  • Samples
  • Apps using Angular Rust
  • Articles Featuring Angular Rust

Community

Contributing

We believe the wider community can create better code. The first tool for improving the community is to tell the developers about the project by giving it a star. More stars - more members.

Angular Rust is a community effort and we welcome all kinds of contributions, big or small, from developers of all backgrounds. We want the Angular Rust community to be a fun and friendly place, so please review our Code of Conduct to learn what behavior will not be tolerated.

New to Angular Rust?

Start learning about the framework by helping us improve our documentation. Pull requests which improve test coverage are also very welcome.

Looking for inspiration?

Check out the community curated list of awesome things related to Angular Rust / WebAssembly at awesome-angular-rust.

Confused about something?

Feel free to drop into our Gitter chatroom or open a new "Question" issue to get help from contributors. Often questions lead to improvements to the ergonomics of the framework, better documentation, and even new features!

Ready to dive into the code?

After reviewing the Contributing Code Guidelines, check out the "Good First Issues" (they are eager for attention!). Once you find one that interests you, feel free to assign yourself to an issue and don't hesitate to reach out for guidance, the issues vary in complexity.

Let's help each other!

Come help us on the issues that matter that the most and receive a small cash reward for your troubles. We use Issuehunt to fund issues from our Open Collective funds. If you really care about an issue, you can choose to add funds yourself!

Found a bug?

Please report all bugs! We are happy to help support developers fix the bugs they find if they are interested and have the time.

Todo

  • Documentation

About

UX Primitives is a core graphic and color abstraction for Angular Rust

angular-rust.github.io/

Topics

colorcolor-schemegraphic-primitivespalettepalette-colorsrustswatches

Resources

Readme
MPL-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

10 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.