A library to print colored strings, with Kotlin.

Overview

kolor

Java CI Download
A library to print colored strings, with Kotlin.

Screenshot

Example

Foreground:

println("We all live in a yellow submarine".yellow())
// Or
println(Kolor.foreground("We all live in a yellow submarine", Color.YELLOW))

Background:

println("I'm blue da ba dee da ba daa".blueBackground())
// Or
println(Kolor.background("I'm blue da ba dee da ba daa", Color.BLUE))

Usage

Add jcenter:

repositories {
    jcenter()
}

Add dependency:

dependencies {
    implementation "com.andreapivetta.kolor:kolor:1.0.0"
}
Comments
  • Publish on mavenCentral

    Publish on mavenCentral

    I'm using kolor through ktlint and I'd like to get rid of jcenter() in my project as every now and then it's flaky and dependencies can't be resolved properly.

    Could you also publish kolor to mavenCentral?

    AFAIK, you can also sync from jcenter / bintray to mavenCentral so it would not need any additional modifications.

    opened by vanniktech 7
  • Implement color extension function for String

    Implement color extension function for String

    Assuming you accept this pull request I would suggest you take it one step further and use this color extension function to implement all the other extension functions.

    fun String.black() = this.color(BLACK)

    Another thing, one of the things which makes Kotlin beautiful is that it's less verbose than Java. Instead of System.out.println we simply write println. With that in mind I'll encourage importing "com.andreapivetta.kolor.Color.*" so all colors aren't prefixed with "Color.".

    Thanks for a nice library.

    opened by tonsV2 2
  • Simplify Color enum

    Simplify Color enum

    This PR simplifies the logic necessary to create each ANSI escape code for the foreground and background.

    It also replaces the abstract functions ANSI() and ANSIBackground() with the more Kotlin-like properties foreground and background.

    opened by mattbdean 0
  • Make .gitignore minimal, don't commit .idea and build/ to version control

    Make .gitignore minimal, don't commit .idea and build/ to version control

    The current .gitignore is a bit overkill for such a small project and leaves some IDE-specific files laying around, as well as the entire build directory.

    This change:

    • Removes and ignores .idea/
    • Removes and ignores build/
    • Makes .gitignore as minimal as possible
    opened by mattbdean 0
  • Moving away from JCenter

    Moving away from JCenter

    Hello

    I'm wondering if you have any plans already to move away from JCenter and publish this to maven central instead? In regards to https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/.

    opened by GertVil 0
Releases(1.0.0)
Owner
Andrea Pivetta
Kotlin, Linux, NodeJS
Andrea Pivetta
Android library to display progress like google does in some of his services.

GoogleProgressBar This library is not maintained anymore and there will be no further releases Android library to display different kind of google rel

JPARDOGO 1.3k Dec 27, 2022
[Android] Round Corner Progress Bar Library for Android

RoundCornerProgressBar Round corner is cool. Let's make your progress bar to round corner Colorful progress bar with round corner on progress which yo

Akexorcist 2.3k Dec 31, 2022
An Android library providing to realize wave loading effect.

WaveLoadingView WaveLoadingView - An Android library that provides a realistic wave-loading effect. Sample Usage For a working implementation of this

Tang 1.7k Jan 2, 2023
A customizable, animated progress bar that features rounded corners. This Android library is designed to look great and be simple to use 🎉

RoundedProgressBar Easy, Beautiful, Customizeable The RoundedProgressBar library gives you a wide range of customizable options for making progress ba

null 541 Jan 1, 2023
[Android] Round Corner Progress Bar Library for Android

RoundCornerProgressBar Round corner is cool. Let's make your progress bar to round corner Colorful progress bar with round corner on progress which yo

Akexorcist 2.3k Jan 7, 2023
A circular android ProgressBar library which extends View, and the usage same as ProgressBar, It has solid,line and solid_line three styles. Besides, progress value can be freely customized.

CircleProgressBar 中文版文档 The CircleProgressBar extends View, It has both solid and line two styles. Besides, progress value can be freely customized. I

dinus_developer 1.2k Jan 3, 2023
DownloadProgressBar is an android library that delivers awesome custom progress bar. You can manipulate it's state in every way.

Download Progress Bar Android progress bar with cool animation, inspired by : https://dribbble.com/shots/2012292-Download-Animation ###Attributes Attr

Mariusz Brona 978 Nov 10, 2022
A highly configurable library to do loading progress with animated balls

Loading Balls A highly configurable library to do loading progress with animated balls for Android How to use Custom attributes lib:path="triangle" Th

Adrián Lomas 930 Dec 7, 2022
Android library for showing progress in a highly customizable pie.

ProgressPieView Android library for showing progress in a highly customizable pie. Choose from the broad spectre of styleable elements: ppvStrokeWidth

Filip Puđak 399 Dec 29, 2022
Android loading or progress dialog widget library, provide efficient way to implement iOS like loading dialog and progress wheel

ACProgressLite English Version / 中文版本 An Android loading widget library. Lite and easy to use, strong customizability. Can be used to implement 'iOS'

Cloudist Technology Co., Ltd. 234 Nov 24, 2022
Open source android library for different progress bar designs

MultiProgressBar A progress bar library for Android that provides customized progress bars. Built with ❤︎ by Aseem Khare ?? Installation Add this in y

Aseem Khare 124 Nov 15, 2022
:barber: [Android Library] Stacked dual progress indicator progress-bar

StackedHorizontalProgressBar Specs Featured in Show some ❤️ Android library with ability to show two progress indicators in one horizontal progress ba

Nishant Srivastava 98 Nov 11, 2022
Android library with collection of cool progress views.

CoolProgressViews Android library with collection of cool progress views. DEMO LINK Also Mention in: Android Library Hunt MaterialUp DEMO DOWNLOAD Add

Amanjeet Singh 83 Nov 29, 2022
Progress Views Library

ProProgressViews Android library with collection of amazing progress views. DEMO Mentions MaterialUp Android Library Hunt DOWNLOAD Add this to your ro

Damanpreet Singh 83 Nov 29, 2022
Android library to realize the various states and transitions in a ProgressBar.

StateProgressBar StateProgressBar is an Android library to realize the various states and transitions in a ProgressBar. Quick Start Get a feel of how

Kofi Gyan 1.5k Jan 9, 2023
Progress Button is a android library for hanling different types state like active, finished, enabled, disabled and reset with a single line of code.

Progress Button is a android library for hanling different types state like active, finished, enabled, disabled and reset with a single line of code.

Sagar Khurana 38 Nov 15, 2022
An android library to easily add circular progress bar into your Jetpack Compose apps.

CircularProgressBar for Jetpack Compose An android library to easily add circular progress bar into your Jetpack Compose apps. Have a Look Usage Circu

Hitanshu Dhawan 38 Oct 30, 2022
A lightweight task progress calendar view library for Android

A lightweight task progress calendar view library for Android

İbrahim Süren 128 Oct 21, 2022
A lightweight circular indicator view library for Android

A lightweight circular indicator view library for Android

İbrahim Süren 241 Dec 30, 2022