Code Monkey home page Code Monkey logo

Comments (6)

niuez avatar niuez commented on May 13, 2024 1

It might cause to use true color theme. 24bit colors are rendered by following codes.

fg and bg are same, so we looks like no characters on screen.

I tried fixing with ColorRGB::to_arr(), example of function to convert to ColorArray.

impl ColorRgb {
    pub fn to_arr(&self) -> ColorArray {
        [
            self.r as f32 / 255.0,
            self.g as f32 / 255.0,
            self.b as f32 / 255.0,
            1.0
        ]
    }
}

Here is example.
image

from rio.

siimon avatar siimon commented on May 13, 2024 1

@raphamorim fixed in the canary build!

from rio.

raphamorim avatar raphamorim commented on May 13, 2024

Can't reproduce on my vim but my nvim is having similar issues. Probably is some missing instruction in the Rio to deal with specific configuration (my vimrc and nvim configs are different)

My VIM

Screenshot 2023-05-25 at 15 29 26

from rio.

raphamorim avatar raphamorim commented on May 13, 2024

good catch @niuez yes, rgb colors are being completely ignored (I can reproduce it as well).

Would mind send a PR correcting it in the AnsiColor::Spec(_rgb) => self.named_colors.foreground to use ColorRgb with to_arr as you suggested or extend ColorBuilder

rio/colors/src/lib.rs

Lines 371 to 380 in ec4f89d

impl ColorBuilder {
#[allow(dead_code)]
fn new(red: f64, green: f64, blue: f64, alpha: f64) -> Self {
Self {
red,
green,
blue,
alpha,
}
}

from rio.

raphamorim avatar raphamorim commented on May 13, 2024

@siimon can you validate if it still happens with the canary release build? https://github.com/raphamorim/rio/releases

from rio.

raphamorim avatar raphamorim commented on May 13, 2024

Great! thank you for confirming @siimon

from rio.

Related Issues (20)

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.