style

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Pink     = lipgloss.AdaptiveColor{Light: "#FF44DD", Dark: "#FF0099"}
	Subtle   = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"}
	DarkGray = lipgloss.Color("#333")

	LightGrayForeground = lipgloss.Color("#BBB")

	OpenSea         = lipgloss.NewStyle().Foreground(OpenseaToneBlue).Render
	Blur            = lipgloss.NewStyle().Foreground(BlurOrange).Render
	BoldAlmostWhite = AlmostWhiteStyle.Copy().Bold(true).Render

	OpenseaToneBlue      = lipgloss.Color("#5f7699")
	WebUIColor           = lipgloss.Color("#662288")
	BlurOrange           = lipgloss.Color("#FF8700")
	TrendGreenStyle      = lipgloss.NewStyle().Foreground(lipgloss.Color("#66CC66"))
	TrendLightGreenStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#77A077"))
	TrendRedStyle        = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF6666"))
	TrendLightRedStyle   = lipgloss.NewStyle().Foreground(lipgloss.Color("#997777"))
	ReddishPurple        = lipgloss.NewStyle().Foreground(lipgloss.Color("#9F2B68"))
	PurplePower          = lipgloss.NewStyle().Foreground(lipgloss.Color("#5D3FD3"))
	AlmostWhiteStyle     = lipgloss.NewStyle().Foreground(lipgloss.Color("#eeeeee"))
	DarkWhiteStyle       = lipgloss.NewStyle().Foreground(lipgloss.Color("#dddddd"))
	VeryLightGrayStyle   = lipgloss.NewStyle().Foreground(lipgloss.Color("#bbbbbb"))
	LightGray            = lipgloss.Color("#999999")
	LightGrayStyle       = lipgloss.NewStyle().Foreground(LightGray)
	Gray4Style           = lipgloss.NewStyle().Foreground(lipgloss.Color("#444"))
	Gray5Style           = lipgloss.NewStyle().Foreground(lipgloss.Color("#555"))
	Gray6Style           = lipgloss.NewStyle().Foreground(lipgloss.Color("#666"))
	Gray7                = lipgloss.Color("#777")
	Gray7Style           = lipgloss.NewStyle().Foreground(Gray7)
	Gray8Style           = lipgloss.NewStyle().Foreground(lipgloss.Color("#888"))
	GrayStyle            = lipgloss.NewStyle().Foreground(lipgloss.Color("#666666"))
	DarkGrayStyle        = lipgloss.NewStyle().Foreground(DarkGray)
	DarkerGrayStyle      = lipgloss.NewStyle().Foreground(darkerGray)
	DarkestGrayStyle     = lipgloss.NewStyle().Foreground(darkestGray)
	BoldStyle            = lipgloss.NewStyle().Bold(true)
	PinkBoldStyle        = BoldStyle.Copy().Foreground(Pink)
	GrayBoldStyle        = BoldStyle.Copy().Foreground(GrayStyle.GetForeground())
	Sharrow              = lipgloss.NewStyle().SetString("→")
	DividerArrowRight    = LightGrayStyle.Copy().SetString("→")
	DividerArrowLeft     = GrayBoldStyle.SetString("←")
)
View Source
var PaletteRLD = []lipgloss.Color{
	"#D23469",
	"#400817",
	"#8D1537",

	"#6A0F27",

	"#6F2B4E",
	"#A14C7C",
	"#A46C8C",
	"#6C3441",
}
View Source
var ShadesPink = []lipgloss.Color{
	"#fff1f6",
	"#ffe5f4",
	"#ffccea",
	"#ffb2e0",
	"#ff99d6",
	"#ff7fcc",
	"#ff66c1",
	"#ff4cb7",
	"#ff32ad",
	"#ff19a3",
	"#ff0099",
}

Functions

func Bold added in v0.4.0

func Bold(str string) string

Bold returns a bold string.

func CreateTrendIndicator

func CreateTrendIndicator(before float64, now float64) lipgloss.Style

func EnforceMinLength added in v0.4.0

func EnforceMinLength(str string, minLength int) string

func FormatAddress added in v0.12.0

func FormatAddress(address *common.Address) string

func FormatTokenInfo added in v0.2.0

func FormatTokenInfo(tokenID *big.Int, collectionName string, primaryStyle lipgloss.Style, secondaryStyle lipgloss.Style, faint bool, color bool) string

FormatTokenInfo func FormatTokenInfo(tokenID *big.Int, collection *collections.GbCollection, faint bool, color bool) string {.

func GenerateAddressColors added in v0.12.0

func GenerateAddressColors(address *common.Address) (lipgloss.Color, lipgloss.Color)

GenerateColors generates two colors based on contract address of the collection.

func GenerateAddressStyles added in v0.12.0

func GenerateAddressStyles(address *common.Address) (lipgloss.Style, lipgloss.Style)

func GenerateColorWithSeed

func GenerateColorWithSeed(seed int64) lipgloss.Color

GenerateColorWithSeed generates a color based on the given seed.

func GetBuyDiffShadeColor added in v0.4.0

func GetBuyDiffShadeColor(priceDiff float64) lipgloss.Color

func GetHeader

func GetHeader(version string) string
SetString("•").
Padding(0, 0).
Foreground(pink)

var Divider = baseDivider.String().

func GetPriceShadeColor

func GetPriceShadeColor(txValue float64) lipgloss.Color

func GetSmallHeader added in v0.7.5

func GetSmallHeader(version string) string

func GetSpinner

func GetSpinner(message string) *yacspin.Spinner

GetSpinner returns a new spinner with default configuration.

func ShortenAddress

func ShortenAddress(address common.Address) string

func ShortenAddressStyled

func ShortenAddressStyled(address *common.Address, style lipgloss.Style) string

ShortenAddressStyled returns a shortened address styled with colors.

func ShortenAdressPTR added in v0.11.1

func ShortenAdressPTR(address *common.Address) string

ShortenAdressPTR returns a shortened address styled with colors.

func ShortenCollectionName added in v0.4.0

func ShortenCollectionName(collectionName string, numItems int) string

func ShortenHashStyled added in v0.9.0

func ShortenHashStyled(txHash common.Hash) string

ShortenHashsStyled returns a shortened hash styled with colors.

func ShortenedTokenIDStyled added in v0.6.0

func ShortenedTokenIDStyled(tokenID *big.Int, primaryStyle lipgloss.Style, secondaryStyle lipgloss.Style) string
func TerminalLink(params ...string) string

TerminalLink formats a link for the terminal using ANSI codes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL