switchon@lavalamp.biz
+27(0) 83 419 4851 / +27(0) 21 036 1165
Application & software development
Get A Quote

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact
    laravel envoyer and forge
    Provisioning A New Digital Ocean Server With Laravel Forge, And Deploying Code With Laravel Envoyer
    Oct 30, 2019
    pull requests
    Pull Requests
    Nov 15, 2019

    Custom App Colours In Flutter

    Categories
    • Mobile Application Development
    • Software Development
    Tags
    • apps
    • colours
    • flutter
    custom app colours in flutter
    custom app colours in flutter

    Flutter has great functionality but when it comes to UI, it lacks in one fundamental method, with all it’s bells and whistles it can’t do one simple thing. YOU CANNOT EASILY SET YOUR OWN CUSTOM COLOURS. This has been the most frustrating thing I have ever come across with no easy way to do so, zero documentation on how to do so either and without a knowledge of colour theory, this becomes near to impossible. Below is a simple code sample you’d need to do just that

    MaterialColor createMaterialColor(Color color) {
        List strengths = [.05];
        Map swatch = {};
        final int r = color.red, g = color.green, b = color.blue;
    
        for (int i = 1; i < 10; i++) {
          strengths.add(0.1 * i);
        }
        strengths.forEach((strength) {
          final double ds = 0.5 - strength;
          swatch[(strength * 1000).round()] = Color.fromRGBO(
            r + ((ds < 0 ? r : (255 - r)) * ds).round(),
            g + ((ds < 0 ? g : (255 - g)) * ds).round(),
            b + ((ds < 0 ? b : (255 - b)) * ds).round(),
            1,
          );
        });
        return MaterialColor(color.value, swatch);
      }
    

    Simply adding this to your material app would allow you to take your Flutter app and match it to any brand you’d like. Even if it doesn’t match the material palette, your app would end up looking professional and not a mismatch of bad colours not in materials design

    Contact us


      Related posts:

      angularUpdating A Primitive Type Variable From A Service In Angular dynamic doughnut graph using laravel vue componentDynamic Doughnut Graph Using Laravel Vue Component how to deploy your app/website on herokuHow To Deploy Your App/Website On Heroku how to send a tweet from within your angular app via node jsHow To Send A Tweet From Within Your Angular App Via Node Js
      Share
      53
      Brad Mc Helem
      Brad Mc Helem

      Leave a Reply Cancel reply

      Your email address will not be published. Required fields are marked *

      Lava Lamp Lab


      Like technology, a lava lamp constantly changes form, producing new conditions with every passing moment



      lava lamp lab facebook   lava lamp lab twitter   lava lamp lab linkedin   lava lamp lab instgram

      Services


      Application & software development

      Outsourced software development

      Project based resourcing

      Digital marketing & consulting

      Graphic design & consulting

      UI / UX design & consulting

      Contact Us


      +27(0) 83 419 4851

      +27(0) 21 036 1165


      switchon@lavalamp.biz


      Unit 4 Monaco Square,
      14 Church Street,
      Durbanville,
      Cape Town, 7550

      NBConsult Group


      nbconsult
      nbconnect msp
      nbclearning
      river broadband
      designer needed
      © 2023 Lava Lamp Lab (Pty) Ltd | All Rights Reserved | Privacy Policy
      Contact us now

        Application & software development

          Outsourced software development

            Project based resourcing

              Digital marketing & consulting

                Graphic design & consulting

                  UI/UX design & consulting

                    Lease an expert

                      Recruitment services

                        We are using cookies to give you the best experience on our website.

                        You can find out more about which cookies we are using or switch them off in settings.

                        Lava Lamp Lab
                        Powered by  GDPR Cookie Compliance
                        Privacy Overview

                        This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

                        Strictly Necessary Cookies

                        Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

                        If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

                        3rd Party Cookies

                        This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

                        Keeping this cookie enabled helps us to improve our website.

                        Please enable Strictly Necessary Cookies first so that we can save your preferences!

                        Cookie Policy

                        More information about our Cookie Policy